Skip to content

Commit

Permalink
test: fix test-debug-port-numbers on OS X
Browse files Browse the repository at this point in the history
According to kill(2), kill returns `EPERM` error if when signalling a
process group any of the members could not be signalled.

PR-URL: #7046
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
santigimeno authored and rvagg committed Jun 2, 2016
1 parent 14b3ba3 commit b23cd48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/parallel/test-debug-port-numbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
}

Expand Down

0 comments on commit b23cd48

Please sign in to comment.