Skip to content

Commit

Permalink
doc: fixes default shell in child_process.md
Browse files Browse the repository at this point in the history
Clarifies that the default shell in Windows is process.env.ComSpec
and that cmd.exe is only used as a fallback. Functions whose
descriptions are affected include:
child_process.spawn, child_process.exec,
child_process.spawnSync, and child_process.execSync.

Fixes: nodejs#14156
  • Loading branch information
henryzxu committed Jul 12, 2017
1 parent 1a07c2a commit e9089d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ changes:
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
`'/bin/sh'` on UNIX, and `'process.env.ComSpec'` on Windows. If
`'process.env.ComSpec'` is unavailable, uses `'cmd.exe'` on Windows instead.
A different shell can be specified as a string. The shell should understand
the `-c` switch on UNIX, or `/d /s /c` on Windows. Defaults to `false` (no shell).
A different shell can be specified as a string. The shell should understand the
`-c` switch on UNIX, or `/d /s /c` on Windows. Defaults to `false` (no shell).
* Returns: {ChildProcess}

The `child_process.spawn()` method spawns a new process using the given
Expand Down Expand Up @@ -780,8 +780,8 @@ changes:
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
`'/bin/sh'` on UNIX, and `'process.env.ComSpec'` on Windows. If
`'process.env.ComSpec'` is unavailable, uses `'cmd.exe'` on Windows instead.
A different shell can be specified as a string. The shell should understand
the `-c` switch on UNIX, or `/d /s /c` on Windows. Defaults to `false` (no shell).
A different shell can be specified as a string. The shell should understand the
`-c` switch on UNIX, or `/d /s /c` on Windows. Defaults to `false` (no shell).
* Returns: {Object}
* `pid` {number} Pid of the child process
* `output` {Array} Array of results from stdio output
Expand Down

0 comments on commit e9089d3

Please sign in to comment.