From 764b457346330db19cefece6ae1477ab71424f4c Mon Sep 17 00:00:00 2001 From: Tim Kuijsten Date: Tue, 12 Jul 2016 16:47:16 +0200 Subject: [PATCH] doc: buffers are not sent over IPC with a socket If a socket is sent to a child, any data that is buffered in the socket will not be sent to the child. The child will only receive data from the socket that is sent after the child has the socket. --- doc/api/child_process.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index cc8b8ce8c67b97..709b069aabeecc 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -839,7 +839,8 @@ Applications should avoid using such messages or listening for The optional `sendHandle` argument that may be passed to `child.send()` is for passing a TCP server or socket object to the child process. The child will receive the object as the second argument passed to the callback function -registered on the `process.on('message')` event. +registered on the `process.on('message')` event. Any data that is received and +buffered in the socket will not be sent to the child. The optional `callback` is a function that is invoked after the message is sent but before the child may have received it. The function is called with a