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 <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
addaleax committed Nov 28, 2019
1 parent 255461e commit ea7a6f9
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 ea7a6f9

Please sign in to comment.