diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-06-04 11:08:13 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-06-05 14:27:05 -0400 |
commit | 9ca367e8ef23be3f6e2a51f7d89411d8746fad56 (patch) | |
tree | cfbc988364a37d8e56413613bd40a97a8619add4 /src/mongo/util/signal_handlers.h | |
parent | b377ac13c1df7108f6f01032d40f5d8818148b24 (diff) | |
download | mongo-9ca367e8ef23be3f6e2a51f7d89411d8746fad56.tar.gz |
SERVER-14079: Add signal handlers to shell
The shell currently lacks the signal handlers that mongod/mongos
have making it tough to investigate issues.
This change does the following
1. Add signal handlers to shell & tools.
2. Add invalid_parameter handler for Windows
3. Add better logging for pure call handler on Windows
4. Take dumps on terminate handler on Windows
5. Change shell to use common signal handlers
6. Remove some random dead code / commented lines.
Diffstat (limited to 'src/mongo/util/signal_handlers.h')
-rw-r--r-- | src/mongo/util/signal_handlers.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/util/signal_handlers.h b/src/mongo/util/signal_handlers.h index 1813019930f..1835d976e26 100644 --- a/src/mongo/util/signal_handlers.h +++ b/src/mongo/util/signal_handlers.h @@ -36,8 +36,11 @@ namespace mongo { * Sets up handlers for signals and other events like terminate and new_handler. * * This must be called very early in main, before runGlobalInitializers(). + * + * installControlCHandler - true means the program would like to setup its on Control-C handler + * - used by command line tools */ - void setupSignalHandlers(); + void setupSignalHandlers(bool installControlCHandler); /** * Starts the thread to handle asynchronous signals. |