|
From: | Jason Rumney |
Subject: | Re: Exit hooks not run at logout on w32 |
Date: | Wed, 28 Jun 2006 22:49:40 +0100 |
User-agent: | Thunderbird 1.5.0.4 (Windows/20060516) |
Lennart Borgman wrote:
Actually emacs recieve a control event instead, CTRL_LOGOFF_EVENT during my testing. (It could also be CTRL_SHUTDOWN_EVENT and probably CTRL_CLOSE_EVENT.) This event can be catched in ctrl_c_handler in w32console.c. I have tried that and then used PostThreadMessage (dwWindowsThreadId, WM_EMACS_KILL, 0, 0) to be able to call save-buffers-kill-emacs later on.You can not run commands that require user interaction after receiving the CTRL_LOGOFF_EVENT. Windows will powerdown 10 seconds after the event is broadcast.
WM_EMACS_KILL seems ok to use here, it is not used anywhere else as far as I can see. It is passed on and shows up in w32_msg_pump. There I am trying to use my_post_msg to pass it to the lisp thread.
Wy not post it directly to the lisp thread in the first place?
[Prev in Thread] | Current Thread | [Next in Thread] |