@tamara027/lerna-terminal
Version:
Powerful cli ui for monorepos
20 lines (16 loc) • 388 B
JavaScript
;
var cmdStop = require('../cmdStop');
/**
* @param {Object} di - dependency injection
* @returns {void}
**/
function handleKillProcess() {
var handleKill = function handleKill() {
return cmdStop(undefined, process.exit);
};
// catch ctrl-c
process.on('SIGINT', handleKill);
// catch kill
process.on('SIGTERM', handleKill);
}
module.exports = handleKillProcess;