You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nod...@googlegroups.com
The docs clearly state that the parent end of a pipe can be opened via the stdio array on the child_process instance. But the docs do not state anything about how to open the pipe in the child. Now with some experimenting I've found that both fs.createReadStream (while skipping the path parameter) and creating a new net.Socket work. It seems like the latter is the most appropriate way of doing this since no variables like path have to be omitted and a duplex stream can be opened right away. I would like to know if using net.Socket is the approved way of opening pipes in a child process and if so, I will create a PR to update the docs.
Ben Noordhuis
unread,
Oct 27, 2014, 10:13:06 AM10/27/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nod...@googlegroups.com
Yes, `new net.Socket({ fd: 42 })` is the best and most efficient way
to connect to a pipe or UNIX socket through an existing file
descriptor. `net.connect()` and `net.createConnection()` are
acceptable, too; they delegate to `net.Socket`.
Tim Kuijsten
unread,
Oct 27, 2014, 10:46:01 AM10/27/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message