summaryrefslogtreecommitdiff
path: root/test/abort
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 /test/abort
parent7535a94c8a54bb6346c8e60dbae1c32d6f508212 (diff)
downloadandroid-node-v8-80ebb4282d29733fefbcee8deb9cc70348eace16.tar.gz
android-node-v8-80ebb4282d29733fefbcee8deb9cc70348eace16.tar.bz2
android-node-v8-80ebb4282d29733fefbcee8deb9cc70348eace16.zip
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 'test/abort')
-rw-r--r--test/abort/test-abort-uncaught-exception.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/abort/test-abort-uncaught-exception.js b/test/abort/test-abort-uncaught-exception.js
index f984719376..fb30cfba3c 100644
--- a/test/abort/test-abort-uncaught-exception.js
+++ b/test/abort/test-abort-uncaught-exception.js
@@ -21,7 +21,7 @@ function run(flags, signals) {
child.on('exit', common.mustCall(function(code, sig) {
if (common.isWindows) {
if (signals)
- assert.strictEqual(code, 3);
+ assert.strictEqual(code, 0xC0000005);
else
assert.strictEqual(code, 1);
} else {