Skip to content

Commit 644bfe1

Browse files
santigimenoMyles Borins
authored and
Myles Borins
committed
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: #7046 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 146cba1 commit 644bfe1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ function kill(child) {
4444
try {
4545
process.kill(-child.pid); // Kill process group.
4646
} catch (e) {
47-
assert.strictEqual(e.code, 'ESRCH'); // Already gone.
47+
// Generally ESRCH is returned when the process group is already gone. On
48+
// some platforms such as OS X it may be EPERM though.
49+
assert.ok((e.code === 'EPERM') || (e.code === 'ESRCH'));
4850
}
4951
}
5052

0 commit comments

Comments
 (0)