mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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>
This commit is contained in:
1 parent
14b3ba35fc
commit
b23cd48ca0
1 file changed
+3
-1
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user