Skip to content

Commit

Permalink
Filter unsupported signals on Windows (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
coreh committed Jan 17, 2018
1 parent d5a941c commit 46f3910
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ v8flags(function (err, v8flags) {
)

// Ignore signals, and instead forward them to the child process.
signals.forEach(signal => process.on(signal, () => proc.kill(signal)))
signals.forEach(signal => process.on(signal, () => {
if (process.platform !== 'win32' || signal === 'SIGINT' || signal === 'SIGTERM' || signal === 'SIGKILL') {
proc.kill(signal)
}
}))

// On spawned close, exit this process with the same code.
proc.on('close', (code: number, signal: string) => {
Expand Down

0 comments on commit 46f3910

Please sign in to comment.