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
{{ message }}
Repository navigation
child_process: fork() with shell is impossible? #13983
Currently, the doc says nothing if fork() is executed with shell, also no shell option is mentioned. However, fork() is based upon spawn() and almost all the options are transferred as is. So, without shell option we have the default spawn() behavior (without shell):
>node test.js'C:\Program' is not recognized as an internal or external command,operable program or batch file.
If a path to the executable has no spaces, we have this error:
>node.8.1.3.exe test.jschild_process.js:106 p.open(fd); ^Error: EBADF: bad file descriptor, uv_pipe_open at Object.exports._forkChild (child_process.js:106:5) at Object.setupChannel (internal/process.js:247:8) at startup (bootstrap_node.js:53:16) at bootstrap_node.js:575:3
So there are some questions:
Should we document fork() and shell interaction (and shell option) and fix these issues?
If not, should we strip shell option before spawning (and maybe somehow document this)?
Activity
cjihrig commentedon Jul 1, 2017
FWIW, I can't reproduce with master on macOS. Perhaps this is Windows specific.
bnoordhuis commentedon Aug 3, 2017
Let's do this; fork() + shell doesn't make sense. I've added a good-first-contribution label.
child_process: set shell to false in fork()
child_process: set shell to false in fork()
child_process: set shell to false in fork()
child_process: set shell to false in fork()
child_process: set shell to false in fork()
child_process: set shell to false in fork()