You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation for the child_process module, process.send() should block. It seems that this is no longer the case in v1.1.0.
//parent.jsvarfork=require('child_process').fork;varchild=fork('./child.js');child.on('message',function(m){console.log('got message from child: '+m);});//child.jsprocess.send(newBuffer(2048));process.exit(0);
In this example, if the child process attempts to send a sufficiently large object to the parent, the child process exits but does not send all of the data. However, smaller messages (perhaps a Buffer of 1024 bytes) are successfully sent.
I think this change in functionality was introduced in 07bd05b when uv__nonblock() was added to uv_pipe_open() in deps/uv/src/unix/pipe.c. Removing the call to uv__nonblock() restores the original behavior of process.send().
I ran into this issue on OSX 10.10.2 LLVM 6.0 (clang-600.0.56), if it helps.
Activity