diff options
author | Tad Marshall <tad@10gen.com> | 2012-10-02 13:03:09 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2012-11-06 15:41:16 -0500 |
commit | 8bb07be63af3bb27f5f03d767dbf0c7fbda07338 (patch) | |
tree | cdd79969bc07cd5fcea10712f7eab830ee785616 | |
parent | b898687cbea980b2e254ad7c9f159514bd64ad54 (diff) | |
download | mongo-8bb07be63af3bb27f5f03d767dbf0c7fbda07338.tar.gz |
SERVER-7031 don't shut down in Windows on CTRL_LOGOFF_EVENT
Versions of Windows prior to Windows Vista send a CTRL_LOGOFF_EVENT
to services (at the handler set by SetConsoleCtrlHandler) when the
interactive user logs off. Return FALSE from this notification and
don't run consoleTerminate().
-rw-r--r-- | src/mongo/db/db.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 6a80fe9e8b4..3bee0908435 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -1290,9 +1290,8 @@ namespace mongo { return TRUE; case CTRL_LOGOFF_EVENT: - rawOut( "CTRL_LOGOFF_EVENT signal" ); - consoleTerminate( "CTRL_LOGOFF_EVENT" ); - return TRUE; + // only sent to services, and only in pre-Vista Windows; FALSE means ignore + return FALSE; case CTRL_SHUTDOWN_EVENT: rawOut( "CTRL_SHUTDOWN_EVENT signal" ); |