diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-11-20 13:57:09 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-11-20 13:57:09 -0500 |
commit | a0f1dc1feef4668302c8c183a9984456e59ea0a2 (patch) | |
tree | 0398df4eef193019fb41fd9ddfb25b263611db63 | |
parent | 015781fb73e66e99abcb2ceb998d22a79d915227 (diff) | |
download | mongo-a0f1dc1feef4668302c8c183a9984456e59ea0a2.tar.gz |
SERVER-32023 quitExit should call TerminateProcess on Windows
-rw-r--r-- | src/mongo/util/quick_exit.cpp | 6 |
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 |