Backport PR 7572
Checklist
-
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
Description of change
There's an issue on some OS X
versions when passing fd's between processes.
When the handle associated to a specific file descriptor is closed by the sender
process before it's received in the destination, the handle is indeed closed
while it should remain opened. In order to fix this behaviour, don't close the
handle until the NODE_HANDLE_ACK
is received by the sender.
Added test-child-process-pass-fd
that is basically test-cluster-net-send
but
creating lots of workers, so the issue reproduces on OS X
consistently.
Fixes: https://github.com/nodejs/node/issues/7512 Ref: https://github.com/nodejs/node/pull/7572 Reviewed-By: Ben Noordhuis info@bnoordhuis.nl Reviewed-By: Colin Ihrig cjihrig@gmail.com