summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2017-11-20 13:57:09 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2017-11-20 13:57:09 -0500
commita0f1dc1feef4668302c8c183a9984456e59ea0a2 (patch)
tree0398df4eef193019fb41fd9ddfb25b263611db63
parent015781fb73e66e99abcb2ceb998d22a79d915227 (diff)
downloadmongo-a0f1dc1feef4668302c8c183a9984456e59ea0a2.tar.gz
SERVER-32023 quitExit should call TerminateProcess on Windows
-rw-r--r--src/mongo/util/quick_exit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/util/quick_exit.cpp b/src/mongo/util/quick_exit.cpp
index 5697b74540c..71eb0c30b8c 100644
--- a/src/mongo/util/quick_exit.cpp
+++ b/src/mongo/util/quick_exit.cpp
@@ -101,9 +101,9 @@ void quickExit(int code) {
#if defined(_WIN32)
// SERVER-23860: VS 2015 Debug Builds abort and Release builds AV when _exit is called on
// multiple threads. Each call to _exit shuts down the CRT, and so subsequent calls into the
- // CRT result in undefined behavior. Bypass _exit CRT shutdown code and call ExitProcess
- // directly instead.
- ::ExitProcess(code);
+ // CRT result in undefined behavior. Bypass _exit CRT shutdown code and call TerminateProcess
+ // directly instead to match GLibc's _exit which calls the syscall exit_group.
+ ::TerminateProcess(GetCurrentProcess(), code);
#else
::_exit(code);
#endif