Browse Source

test: Kill zombies when debugger-client fails on windows

v0.10.0-release
isaacs 12 years ago
parent
commit
98c6a81771
  1. 10
      test/simple/test-debugger-client.js

10
test/simple/test-debugger-client.js

@ -162,7 +162,15 @@ function doTest(cb, done) {
nodeProcess.stdout.once('data', function(c) {
console.log('>>> new node process: %d', nodeProcess.pid);
process._debugProcess(nodeProcess.pid);
var failed = true;
try {
process._debugProcess(nodeProcess.pid);
failed = false;
} finally {
// At least TRY not to leave zombie procs if this fails.
if (failed)
nodeProcess.kill('SIGTERM');
}
console.log('>>> starting debugger session');
});

Loading…
Cancel
Save