summaryrefslogtreecommitdiff
path: root/test/parallel/test-windows-abort-exitcode.js
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/parallel/test-windows-abort-exitcode.js
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/parallel/test-windows-abort-exitcode.js')
-rw-r--r--test/parallel/test-windows-abort-exitcode.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-windows-abort-exitcode.js b/test/parallel/test-windows-abort-exitcode.js
index d61a91315b..e2e6570c1c 100644
--- a/test/parallel/test-windows-abort-exitcode.js
+++ b/test/parallel/test-windows-abort-exitcode.js
@@ -16,7 +16,7 @@ if (process.argv[2] === 'child') {
} else {
const child = spawn(process.execPath, [__filename, 'child']);
child.on('exit', common.mustCall((code, signal) => {
- assert.strictEqual(code, 3);
+ assert.strictEqual(code, 134);
assert.strictEqual(signal, null);
}));
}