Skip to content

Commit

Permalink
Better way to kill process (#569)
Browse files Browse the repository at this point in the history
As per #293 (comment), this change still keeps the desired behaviour of killing the process on CTRL-C, but it gives parent processes a chance to clean up.
  • Loading branch information
adamreisnz authored and SBoudrias committed Jul 24, 2017
1 parent 29112d9 commit c4b7ece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ui/baseUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var UI = module.exports = function (opt) {

// Terminate process on SIGINT (which will call process.on('exit') in return)
this.rl.on('SIGINT', function () {
process.exit(0);
process.kill(process.pid, 'SIGINT');
});
};

Expand Down

0 comments on commit c4b7ece

Please sign in to comment.