emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exit hooks not run at logout on w32


From: Lennart Borgman
Subject: Re: Exit hooks not run at logout on w32
Date: Mon, 26 Jun 2006 21:54:09 +0200
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

Jason Rumney wrote:
Lennart Borgman wrote:

As far as I can see the exit hooks for Emacs are not run when a user logs out from Windows 2000 or reboots the pc. I do not know however if this problem is specific to w32. It is in my opinion a serious problem that ought to be fixed before the release.
I'm not sure they can be run reliably. The system gives Emacs (or any other application) a short amount of time to exit cleanly before issuing the equivalent of a kill -9. Since such hooks often involve user interaction, there is no guarantee that we will finish in time, so the safest thing to do is to just make sure all autosave files are written before exiting so that the user can recover their session later.

I do believe it is safe to run the normal save-buffers-kill-emacs and the exit hooks. At least it seems so to me on Windows 2000. I am not sure about the details however. Maybe the Windows dialog box that shows up can be turned off so that you are sure a reboot is done in some circumstances? Then it would be best to write the autosave files first and then save-buffers-kill-emacs and the exit hooks.

Where is the code that discovers that WM_CLOSE has been sent to the last frame and that Emacs should be killed?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]