Skip to content

Commit

Permalink
fix: add windows signals SIGUSR2 & SIGUSR1 to terminate the process (#…
Browse files Browse the repository at this point in the history
…1938)

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

Fixes: #1903, #1915, #1936, #1937, #1882, #1893
  • Loading branch information
immortalmind2016 committed Oct 19, 2021
1 parent b449171 commit 61e7abd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/monitor/run.js
Expand Up @@ -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
Expand Down

0 comments on commit 61e7abd

Please sign in to comment.