nodejs detect ctrl c code example
Example: node js on ctrl c
process.on('SIGINT', function() {
console.log("Caught interrupt signal");
if (i_should_exit)
process.exit();
});
process.on('SIGINT', function() {
console.log("Caught interrupt signal");
if (i_should_exit)
process.exit();
});