UNPKG

@tamara027/lerna-terminal

Version:
20 lines (16 loc) 388 B
'use strict'; 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;