Skip to content

Commit

Permalink
test: add regression test for signal handler removal in exit
Browse files Browse the repository at this point in the history
Refs: #30581
Refs: #30582

PR-URL: #30589
Refs: #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>
  • Loading branch information
addaleax committed Nov 30, 2019
1 parent cc5875b commit 0972fa3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/parallel/test-signal-handler-remove-on-exit.js
Original file line number Diff line number Diff line change
@@ -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));

0 comments on commit 0972fa3

Please sign in to comment.