Open dandv opened 7 years ago
If I run my script (on Ubuntu) as node script.js 2>&1 | tee script.log and press ^C, nothing is printed or logged to the file. Without the piping, I do see the croak being logged.
node script.js 2>&1 | tee script.log
croak
const nodeCleanup = require('node-cleanup'); setTimeout(function () {}, 10000); nodeCleanup(function (exitCode, signal) { // release resources here before node exits console.log('croak'); });
I'm a Windows user so I'm only guessing here, but won't ctrl+c interrupt the entire pipeline, not just the current step?
If I run my script (on Ubuntu) as
node script.js 2>&1 | tee script.log
and press ^C, nothing is printed or logged to the file. Without the piping, I do see thecroak
being logged.