From 61e7abd730839979c3ec099830d4af7030a6ce3f Mon Sep 17 00:00:00 2001 From: mohamed salah Date: Tue, 19 Oct 2021 16:29:36 +0200 Subject: [PATCH] fix: add windows signals SIGUSR2 & SIGUSR1 to terminate the process (#1938) Authored-by: mohamed Fixes: #1903, #1915, #1936, #1937, #1882, #1893 --- 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