From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.devel Subject: Re: Exit hooks not run at logout on w32 Date: Tue, 04 Jul 2006 08:55:40 +0200 Message-ID: <44AA10EC.2080503@student.lu.se> References: <44A005B7.2080904@student.lu.se> <44A03B61.8080501@student.lu.se> <44A2B99B.1020002@student.lu.se> <44A2F974.7040609@gnu.org> <44A31C19.5050000@student.lu.se> <44A3A2DE.4040507@gnu.org> <44A3E918.5000304@student.lu.se> <85lkrg3t3a.fsf@lola.goethe.zz> <44A3FCCD.4040203@student.lu.se> <7dbe73ed0606291440r15b9f5pd1c7f35344d79c42@mail.gmail.com> <44A4576F.7060004@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1151996228 25624 80.91.229.2 (4 Jul 2006 06:57:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Jul 2006 06:57:08 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Emacs Devel , Mathias Dahl Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Tue Jul 04 08:57:05 2006 Return-path: Envelope-to: gebp-emacs-pretest-bug@gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FxeqB-0005lk-75 for gebp-emacs-pretest-bug@gmane.org; Tue, 04 Jul 2006 08:56:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FxeqA-0007Xh-Ib for gebp-emacs-pretest-bug@gmane.org; Tue, 04 Jul 2006 02:56:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fxep7-00071d-H0 for emacs-pretest-bug@gnu.org; Tue, 04 Jul 2006 02:55:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fxep4-000702-Un for emacs-pretest-bug@gnu.org; Tue, 04 Jul 2006 02:55:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fxep4-0006zw-HM; Tue, 04 Jul 2006 02:55:50 -0400 Original-Received: from [81.228.8.83] (helo=pne-smtpout1-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fxf2Z-0006xn-Hz; Tue, 04 Jul 2006 03:09:47 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn2.hy.skanova.net (7.2.075) id 44A2E86F001138FB; Tue, 4 Jul 2006 08:55:41 +0200 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) Original-To: Lennart Borgman In-Reply-To: <44A4576F.7060004@student.lu.se> X-BeenThere: emacs-pretest-bug@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for CVS Emacs." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Errors-To: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.pretest.bugs:12737 gmane.emacs.devel:56463 Archived-At: Lennart Borgman wrote: >> If Microsoft's guide lines are what someone stated here, maybe the >> reason for them is that the shutdown process is considered to have >> higher priority than a user's unsaved data? If that is the case, >> halting that process maybe isn't such a good idea. Someone said that >> the autosave is enough and I agree. Your argument against it, that >> someone might edit the file from some other program before using the >> auto save data, does not seem like a very likely scenario. Or is it? > > I am unsure about that guideline since I have never seen it. However > the InitiateSystemShutdown API has a parameter called bForceAppsClosed > with the following description: > > If this parameter is TRUE, applications with unsaved changes are to > be forcibly closed. Note that this can result in data loss. > If this parameter is FALSE, the system displays a dialog box > instructing the user to close the applications. > > (See http://windowssdk.msdn.microsoft.com/en-us/library/ms723171.aspx) > > So the system can be rebooted or shutdown whatever the software > running on it does. During normal system shutdown however the > parameter is TRUE as far as I can see from the behaviour. Could the problem that users unsaved data are not saved on w32 in this situation be put in FOR-RELEASE? I think it is a serious bug. I have already sent a patch for this, but I have got no response on that. There is possibly disagreement on what to do, but something should be done and I do believe that the correct fix should make Emacs follow the guidelines on w32. Jason said he had read them. I asked for a link to them, but I have not seen it yet. Instead I provided the above snippet.