diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-11-22 15:19:33 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-11-28 02:02:33 +0100 |
commit | ea7a6f9dbd05654fff3f8c474ac0f5126bc87376 (patch) | |
tree | cebe9f4852e8f15a4b3e3fb14de772551ec2355d /test/parallel/test-signal-handler-remove-on-exit.js | |
parent | 255461e19ab08748e2b9b375ff26191bd1cdc8d9 (diff) | |
download | android-node-v8-ea7a6f9dbd05654fff3f8c474ac0f5126bc87376.tar.gz android-node-v8-ea7a6f9dbd05654fff3f8c474ac0f5126bc87376.tar.bz2 android-node-v8-ea7a6f9dbd05654fff3f8c474ac0f5126bc87376.zip |
test: add regression test for signal handler removal in exit
Refs: https://github.com/nodejs/node/pull/30581
Refs: https://github.com/nodejs/node/pull/30582
PR-URL: https://github.com/nodejs/node/pull/30589
Refs: https://github.com/nodejs/node/issues/30581
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-signal-handler-remove-on-exit.js')
-rw-r--r-- | test/parallel/test-signal-handler-remove-on-exit.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/parallel/test-signal-handler-remove-on-exit.js b/test/parallel/test-signal-handler-remove-on-exit.js new file mode 100644 index 0000000000..1c87497172 --- /dev/null +++ b/test/parallel/test-signal-handler-remove-on-exit.js @@ -0,0 +1,9 @@ +'use strict'; +require('../common'); + +// Regression test for https://github.com/nodejs/node/issues/30581 +// This script should not crash. + +function dummy() {} +process.on('SIGINT', dummy); +process.on('exit', () => process.removeListener('SIGINT', dummy)); |