Browse Source

test: fix test-debug-port-numbers on OS X

According to kill(2), kill returns `EPERM` error if when signalling a
process group any of the members could not be signalled.

PR-URL: https://github.com/nodejs/node/pull/7046
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v7.x
Santiago Gimeno 9 years ago
parent
commit
6e148a34dc
  1. 4
      test/parallel/test-debug-port-numbers.js

4
test/parallel/test-debug-port-numbers.js

@ -44,7 +44,9 @@ function kill(child) {
try {
process.kill(-child.pid); // Kill process group.
} catch (e) {
assert.strictEqual(e.code, 'ESRCH'); // Already gone.
// Generally ESRCH is returned when the process group is already gone. On
// some platforms such as OS X it may be EPERM though.
assert.ok((e.code === 'EPERM') || (e.code === 'ESRCH'));
}
}

Loading…
Cancel
Save