(daemon) allow to overide signal used to kill process #2976

This commit is contained in:
vmarchaud 2017-06-27 21:24:31 +02:00
parent 823635e713
commit cd40b5d691

View File

@ -213,14 +213,14 @@ module.exports = function(God) {
if (pm2_env.treekill !== true) {
try {
process.kill(parseInt(pid), 'SIGINT');
process.kill(parseInt(pid), process.env.PM2_KILL_SIGNAL || 'SIGINT');
} catch(e) {
console.error('[SimpleKill] %s pid can not be killed', pid, e.stack, e.message);
}
return God.processIsDead(pid, pm2_env, cb);
}
else {
treekill(parseInt(pid), 'SIGINT', function(err) {
treekill(parseInt(pid), process.env.PM2_KILL_SIGNAL || 'SIGINT', function(err) {
return God.processIsDead(pid, pm2_env, cb);
});
}