diff options
Diffstat (limited to 'db/instance.cpp')
-rw-r--r-- | db/instance.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/db/instance.cpp b/db/instance.cpp index 09543bda4db..0b3953e4d6e 100644 --- a/db/instance.cpp +++ b/db/instance.cpp @@ -927,6 +927,15 @@ namespace mongo { catch (...) { } #endif +#ifdef _WIN32 + // Windows Service Controller wants to be told when we are down, + // so don't call ::exit() yet, or say "really exiting now" + // + if ( rc == EXIT_WINDOWS_SERVICE_STOP ) { + if ( c ) c->shutdown(); + return; + } +#endif tryToOutputFatal( "dbexit: really exiting now" ); if ( c ) c->shutdown(); ::exit(rc); |