Skip to content

Commit

Permalink
test: kill children before cluster parent
Browse files Browse the repository at this point in the history
Killing the cluster master first on Windows causes an ESRCH when killing
the children as the OS takes care of them itself.

PR-URL: node-forward/node#53
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
rvagg authored and bnoordhuis committed Nov 10, 2014
1 parent 1183ba4 commit 454fbb8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/simple/test-debug-signal-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ setTimeout(function testTimedOut() {
}, 6000);

process.on('exit', function onExit() {
pids.forEach(function(pid) {
// Kill processes in reverse order to avoid timing problems on Windows where
// the parent process is killed before the children.
pids.reverse().forEach(function(pid) {
process.kill(pid);
});
});
Expand Down

0 comments on commit 454fbb8

Please sign in to comment.