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
  • Loading branch information
addaleax committed Nov 22, 2019
1 parent f6de66e commit d51233c
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 d51233c

Please sign in to comment.