summaryrefslogtreecommitdiff
path: root/src/mongo/util/signal_handlers_synchronous.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2015-01-23 17:34:01 -0500
committerMathias Stearn <mathias@10gen.com>2015-01-27 19:12:40 -0500
commit0126c434740e1d659ec252685e57c90b98b4b54f (patch)
tree376d39c4cc6af77b025ccb29d4a91d2237a25770 /src/mongo/util/signal_handlers_synchronous.cpp
parentd0e977f7310a1befaa48ffb9edee71e9fc004421 (diff)
downloadmongo-0126c434740e1d659ec252685e57c90b98b4b54f.tar.gz
SERVER-17031 Don't handle SIGQUIT on the signal handling thread
It doesn't work if CTRL-C hung, which is the primary use case.
Diffstat (limited to 'src/mongo/util/signal_handlers_synchronous.cpp')
-rw-r--r--src/mongo/util/signal_handlers_synchronous.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/util/signal_handlers_synchronous.cpp b/src/mongo/util/signal_handlers_synchronous.cpp
index 3ed71f07fd7..680324ec781 100644
--- a/src/mongo/util/signal_handlers_synchronous.cpp
+++ b/src/mongo/util/signal_handlers_synchronous.cpp
@@ -266,6 +266,9 @@ namespace {
sigemptyset(&addrSignals.sa_mask);
addrSignals.sa_flags = SA_SIGINFO;
+ // ^\ is the stronger ^C. Log and quit hard without waiting for cleanup.
+ invariant(signal(SIGQUIT, abruptQuit) != SIG_ERR);
+
invariant(sigaction(SIGSEGV, &addrSignals, 0) == 0);
invariant(sigaction(SIGBUS, &addrSignals, 0) == 0);
invariant(sigaction(SIGILL, &addrSignals, 0) == 0);