Join GitHub today
forked processes ends socket connection if the child takes too long to load #6203
A forked process
As discussed in the google group this may only be an issue on OSX.
I put together a small gist to demonstrate:
Confirmed, thanks. I suspect there is some faulty logic in lib/child_process.js that closes the file descriptor before the child receives it. If you rewrite your test case to send over res.socket._handle rather than res.socket, then everything works - apart from the fact that the parent process now leaks file descriptors like mad, of course.