This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Cannot work with stdin in a sub-subprocess with require('child_process').fork() #3240
Closed
Description
I'm pretty sure this is a bug. @substack and I spent some time tracking this down when his application wouldn't deploy to nodejitsu:
Reproduce it
- Clone this application: http://github.com/substack/pix
- Add this script to it: https://gist.github.com/2640933
In (2) I added a layer of indirection which spawns server.js
, once with .fork()
and once with .spawn()
.
Here's a quick rundown of the process tree(s):
- Just running
node server.js
server.js
`-- worker.js
`-- worker.js
- Running
node spawn.js
spawn.js
`-- server.js
`-- worker.js
`-- worker.js
So just that one level of indirection with .fork() breaks all piping of process.stdin.
@piscisaureus @isaacs @bnoordhuis You guys have any thoughts here? I'm stumped why this is happening, but I know it is.
Metadata
Assignees
Labels
No labels