-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
Description
Operating System
- MacOS
- Linux
NodeJS Version
- 10.15.3
Tmp Version
- 0.1.0
Expected Behavior
Allow executing app defined SIGINT handlers
Experienced Behavior
App exits before custom handlers are executed.
Here is the reason: https://github.com/raszi/node-tmp/blob/master/lib/tmp.js#L635
Code to reproduce:
const tmp = require('tmp');
console.log(`Run from terminal: kill -SIGINT ${process.pid}`);
process.on('SIGINT', () => {
console.log('Custom SIGINT handler - do some clean up')
process.exit(0);
});
setTimeout(() => {}, 100000)
Custom SIGINT handler - do some clean up not printed.
The same code works OK with [email protected]
alexeevg, jknoxville, Dreamer53, eugene1g, Tyler-Murphy and 2 morealexeevg