summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorJared Kantrowitz <jared.kantrowitz@gmail.com>2017-06-24 15:37:59 -0400
committerRefael Ackermann <refack@gmail.com>2017-08-07 22:46:01 -0400
commit80ebb4282d29733fefbcee8deb9cc70348eace16 (patch)
treecbe4f012998e14f69a18f1079383394154cce17d /src/util.h
parent7535a94c8a54bb6346c8e60dbae1c32d6f508212 (diff)
downloadnode-new-80ebb4282d29733fefbcee8deb9cc70348eace16.tar.gz
src: adjust windows abort behavior
Raising SIGABRT is handled in the CRT in windows, calling _exit() with ambiguous code "3" by default. This adjustment to the abort behavior gives a more sane exit code on abort, by calling _exit directly with code 134. PR-URL: https://github.com/nodejs/node/pull/13947 Fixes: https://github.com/nodejs/node/issues/12271 Refs: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/abort Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index 1272de1893..08308d837f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -95,7 +95,7 @@ template <typename T> using remove_reference = std::remove_reference<T>;
// Windows 8+ does not like abort() in Release mode
#ifdef _WIN32
-#define ABORT_NO_BACKTRACE() raise(SIGABRT)
+#define ABORT_NO_BACKTRACE() _exit(134)
#else
#define ABORT_NO_BACKTRACE() abort()
#endif