From 7fa1986e208dc1dac209b344125d5dc896fcbeed Mon Sep 17 00:00:00 2001 From: mohamed Date: Sat, 16 Oct 2021 16:04:05 +0200 Subject: [PATCH] fix: add windows signals SIGUSR2 & SIGUSR1 to terminate the process --- lib/monitor/run.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/monitor/run.js b/lib/monitor/run.js index 342310fc..36a4864a 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -333,10 +333,10 @@ function kill(child, signal, callback) { } }; - // We are handling a 'SIGKILL' POSIX signal under Windows the + // We are handling a 'SIGKILL' , 'SIGUSR2' and 'SIGUSR1' POSIX signal under Windows the // same way it is handled on a UNIX system: We are performing // a hard shutdown without waiting for the process to clean-up. - if (signal === 'SIGKILL' || osRelease < 10) { + if (signal === 'SIGKILL' || osRelease < 10 || signal === 'SIGUSR2' || signal==="SIGUSR1" ) { debug('terminating process group by force: %s', child.pid); // We are using the taskkill utility to terminate the whole