summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2018-06-19 14:04:12 -0400
committerJonathan Reams <jbreams@mongodb.com>2018-06-26 11:07:41 -0400
commit43695048b2359962549dc11ce7d075375b7fb3cf (patch)
tree4ff39427f7e1ad39b38e9f245c0471ffc0f16e25 /src
parentcf0b52c7c29fe4917b9e50776fa79a85a952b735 (diff)
downloadmongo-43695048b2359962549dc11ce7d075375b7fb3cf.tar.gz
SERVER-34160 Exit shell cleanly on SIGHUP
Diffstat (limited to 'src')
-rw-r--r--src/mongo/shell/dbshell.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp
index 964e70e18b6..5e24c905c4f 100644
--- a/src/mongo/shell/dbshell.cpp
+++ b/src/mongo/shell/dbshell.cpp
@@ -220,6 +220,9 @@ char* shellReadline(const char* prompt, int handlesigint = 0) {
}
void setupSignals() {
+#ifndef _WIN32
+ signal(SIGHUP, quitNicely);
+#endif
signal(SIGINT, quitNicely);
}