DOC: input
option in child_process.spawnSync
require stdio[0]
to be pipe
#49417
Labels
child_process
Issues and PRs related to the child_process subsystem.
doc
Issues and PRs related to the documentations.
Affected URL(s)
https://nodejs.org/api/child_process.html#child_processspawnsynccommand-args-options
Description of the problem
to use the
input
option inchild_process.spawnSync
also need thestdio[0]
option to be set as'pipe'
current doc (v20.5.1) specifies:
the actual behavior is more like:
test done on Linux, and Win+GitBash with node v18.14.0 and v20.2.0
baseline test command:
with nodejs
input
with defaultstdio
('pipe'
) works:but setting
stdio[0]
to'ignore'
or'inherit'
will actually override
input
optionother
execFileSync
andexecSync
in synchronous-process-creation also have similar behavior:The text was updated successfully, but these errors were encountered: