summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-09-08 14:58:15 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-09-08 14:58:15 +0000
commitbd84404b0f279a82206c70e1aa090a6aaa21bf45 (patch)
tree96f0b73fb853819c33e8fb8c8963cf0b5064104b /winsup/cygwin/exceptions.cc
parentf4613fcd1ddbff0999c770cf9006ac285db2495b (diff)
downloadcygnal-bd84404b0f279a82206c70e1aa090a6aaa21bf45.tar.gz
cygnal-bd84404b0f279a82206c70e1aa090a6aaa21bf45.tar.bz2
cygnal-bd84404b0f279a82206c70e1aa090a6aaa21bf45.zip
* exceptions.cc (ctrl_c_handler): Disable any special CTRL_LOGOFF_EVENT
handling and add longish comment about the reasons.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 2f9567e09..f390669c0 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -881,11 +881,25 @@ ctrl_c_handler (DWORD type)
}
if (!saw_close && type == CTRL_LOGOFF_EVENT)
{
+#if 0
+ /* CV, 2005-09-08: The CTRL_LOGOFF_EVENT is only send to services.
+ It's send when *any* user logs off. Services generally have
+ a modified console handler which allows services to survive
+ also after a user logged out, even if the service has a console
+ window attached to the visible window station of the user
+ ("Interact with desktop"). The below code contradicts this
+ standard behaviour, so for now, we disable it and just return
+ FALSE to get the default behaviour or the one the application's
+ own console handler (if any) requires.
+ In other words: We never send SIGHUP to services and their
+ child processes on a LOGOFF event. */
+
/* Check if the process is actually associated with a visible
window station, one which actually represents a visible desktop.
If not, the CTRL_LOGOFF_EVENT doesn't concern this process. */
if (has_visible_window_station ())
sig_send (myself_nowait, SIGHUP);
+#endif
return FALSE;
}
}