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 <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
santigimeno authored and Myles Borins committed Jul 14, 2016
1 parent 146cba1 commit 644bfe1
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 644bfe1

Please sign in to comment.