mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
(daemon) allow to overide signal used to kill process #2976
This commit is contained in:
parent
823635e713
commit
cd40b5d691
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user