<!-- Thank you for reporting a possible bug in Node.js. Please fill in as much of the template below as you can. Version: output of `node -v` Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows) Subsystem: if known, please specify the affected core module name If possible, please provide code that demonstrates the problem, keeping it as simple and free of external dependencies as you can. --> * **Version**: v11.15.0 * **Platform**: Linux tsundberg-dev 4.18.0-20-generic #21~18.04.1-Ubuntu SMP Wed May 8 08:43:37 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux * **Subsystem**: process <!-- Please provide more details below this comment. --> --- To run the following tests paste them into `index.js` and run `node index.js; echo $?` --- #### Case 1 The following results in an expected output: ```node process.kill(process.pid, 'SIGTERM') ``` Output: ``` Terminated 143 ``` --- #### Case 2 Adding a SIGTERM results in an exit code of 0, and the handler never runs: ```node process.on('SIGTERM', () => { console.error('Handle ran!') process.exit(1) }) process.kill(process.pid, 'SIGTERM') ``` Output: ``` 0 ``` --- #### Case 3 Adding a timeout or some other task that keeps node alive results in the expected behavior: ```node process.on('SIGTERM', () => { console.error('Handle ran!') process.exit(1) }) process.kill(process.pid, 'SIGTERM') setTimeout(() => {}, 100000) ``` Output: ``` Handle ran! 1 ```