Mail Archives: cygwin/1998/03/23/23:12:08
The exception handler that deals with the Win32 events CTRL_LOGOFF_EVENT,
CTRL_SHUTDOWN_EVENT and CTRL_CLOSE_EVENT seems to not quite do the right
thing. When shutting down my NT 4.0 system, I get a dialog box for each open
bash window asking me if I want to kill the process or wait for it to shut
down.
This happens because the winsup handler function returns TRUE, which,
according to the MS documentation, signals the OS to bring up this dialog box.
However, if the handler returns FALSE, Win32 will call the other registered
handlers for the event, and the default handler terminates the process, which
may not be what you want.
The doc goes on to say that you can use the SetProcessShutdownParameters
function to prevent the dialog box from being displayed.
My question to the Win32 experts is this: is it better to have the handler
return FALSE, or to use SetProcessShutdownParameters?
--Curtis Galloway
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -