fix: add windows signals SIGUSR2 & SIGUSR1 to terminate the process (#1938)

Authored-by: mohamed <mohamedsalah.software@gmail.com>

Fixes: #1903, #1915, #1936, #1937, #1882, #1893
This commit is contained in:
mohamed salah
2021-10-19 16:29:36 +02:00
committed by GitHub
parent b449171d58
commit 61e7abd730

View File

@@ -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