Skip to content

Commit 454fbb8

Browse files
rvaggbnoordhuis
authored andcommitted
test: kill children before cluster parent
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 <[email protected]>
1 parent 1183ba4 commit 454fbb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/simple/test-debug-signal-cluster.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ setTimeout(function testTimedOut() {
7373
}, 6000);
7474

7575
process.on('exit', function onExit() {
76-
pids.forEach(function(pid) {
76+
// Kill processes in reverse order to avoid timing problems on Windows where
77+
// the parent process is killed before the children.
78+
pids.reverse().forEach(function(pid) {
7779
process.kill(pid);
7880
});
7981
});

0 commit comments

Comments
 (0)