Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

child_process documentation for stdio #9636

Closed
skovhus opened this issue Nov 16, 2016 · 3 comments
Closed

child_process documentation for stdio #9636

skovhus opened this issue Nov 16, 2016 · 3 comments
Labels
child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.

Comments

@skovhus
Copy link
Contributor

skovhus commented Nov 16, 2016

The child_process documentation for execFileSync, execSync and spawnSync notes that options.stdio is an array.

But it seems it can also be a string, similar to the stdio options given to child_process.spawn.

Actually execFileSync, execSync and spawnSync all ends up here, where the options are accepted as string or array. See https://github.com/nodejs/node/blob/master/lib/internal/child_process.js#L758

@claudiorodriguez claudiorodriguez added child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations. labels Nov 16, 2016
@sam-github
Copy link
Contributor

To be clear: that it can be a String is documented: https://nodejs.org/api/child_process.html#child_process_options_stdio, but not described in the type annotations.

@skovhus
Copy link
Contributor Author

skovhus commented Nov 16, 2016

@sam-github but a bit confusing when child_process.fork is documented in the same context, but it doesn't support it being a string.

@sam-github
Copy link
Contributor

That fork doesn't support String is a documented (https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options) misfeature, if you PR a fix with test code, I'd happily LGTM it!

Randomly different APIs that could be the same are maddening :-(

skovhus added a commit to skovhus/node that referenced this issue Nov 16, 2016
Document that `execFileSync`, `execSync` and `spawnSync` also supports `stdio` as an Array.

Fixes: nodejs#9636
skovhus added a commit to skovhus/node that referenced this issue Nov 19, 2016
Document that `execFileSync`, `execSync` and `spawnSync` also supports `stdio` as an Array.

Fixes: nodejs#9636
MylesBorins pushed a commit that referenced this issue Nov 22, 2016
Document that `execFileSync`, `execSync` and `spawnSync` also support
`stdio` as an Array.

PR-URL: #9637
Fixes: #9636
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
MylesBorins pushed a commit that referenced this issue Nov 22, 2016
Document that `execFileSync`, `execSync` and `spawnSync` also supports `stdio` as an Array.

PR-URL: #9701
Fixes: #9636
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this issue Nov 22, 2016
PR-URL: #9701
Fixes: #9636
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this issue Nov 22, 2016
Document that `execFileSync`, `execSync` and `spawnSync` also support
`stdio` as an Array.

PR-URL: #9637
Fixes: #9636
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
addaleax pushed a commit that referenced this issue Nov 22, 2016
Document that `execFileSync`, `execSync` and `spawnSync` also support
`stdio` as an Array.

PR-URL: #9637
Fixes: #9636
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
MylesBorins pushed a commit that referenced this issue Nov 22, 2016
Document that `execFileSync`, `execSync` and `spawnSync` also supports `stdio` as an Array.

PR-URL: #9701
Fixes: #9636
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this issue Nov 22, 2016
PR-URL: #9701
Fixes: #9636
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

No branches or pull requests

3 participants