1- # Child Process
1+ # Child process
22
33<!-- introduced_in=v0.10.0-->
44
@@ -70,7 +70,7 @@ For certain use cases, such as automating shell scripts, the
7070the synchronous methods can have significant impact on performance due to
7171stalling the event loop while spawned processes complete.
7272
73- ## Asynchronous Process Creation
73+ ## Asynchronous process creation
7474
7575The [ ` child_process.spawn() ` ] [ ] , [ ` child_process.fork() ` ] [ ] , [ ` child_process.exec() ` ] [ ] ,
7676and [ ` child_process.execFile() ` ] [ ] methods all follow the idiomatic asynchronous
@@ -153,7 +153,7 @@ changes:
153153 * ` env ` {Object} Environment key-value pairs. ** Default:** ` process.env ` .
154154 * ` encoding ` {string} ** Default:** ` 'utf8' `
155155 * ` shell ` {string} Shell to execute the command with. See
156- [ Shell Requirements ] [ ] and [ Default Windows Shell ] [ ] . ** Default:**
156+ [ Shell requirements ] [ ] and [ Default Windows shell ] [ ] . ** Default:**
157157 ` '/bin/sh' ` on Unix, ` process.env.ComSpec ` on Windows.
158158 * ` timeout ` {number} ** Default:** ` 0 `
159159 * ` maxBuffer ` {number} Largest amount of data in bytes allowed on stdout or
@@ -270,8 +270,8 @@ changes:
270270 done on Windows. Ignored on Unix. ** Default:** ` false ` .
271271 * ` shell ` {boolean|string} If ` true ` , runs ` command ` inside of a shell. Uses
272272 ` '/bin/sh' ` on Unix, and ` process.env.ComSpec ` on Windows. A different
273- shell can be specified as a string. See [ Shell Requirements ] [ ] and
274- [ Default Windows Shell ] [ ] . ** Default:** ` false ` (no shell).
273+ shell can be specified as a string. See [ Shell requirements ] [ ] and
274+ [ Default Windows shell ] [ ] . ** Default:** ` false ` (no shell).
275275* ` callback ` {Function} Called with the output when process terminates.
276276 * ` error ` {Error}
277277 * ` stdout ` {string|Buffer}
@@ -355,7 +355,7 @@ changes:
355355 ** Default:** ` process.execArgv ` .
356356 * ` serialization ` {string} Specify the kind of serialization used for sending
357357 messages between processes. Possible values are ` 'json' ` and ` 'advanced' ` .
358- See [ Advanced Serialization ] [ ] for more details. ** Default:** ` 'json' ` .
358+ See [ Advanced serialization ] [ ] for more details. ** Default:** ` 'json' ` .
359359 * ` silent ` {boolean} If ` true ` , stdin, stdout, and stderr of the child will be
360360 piped to the parent, otherwise they will be inherited from the parent, see
361361 the ` 'pipe' ` and ` 'inherit' ` options for [ ` child_process.spawn() ` ] [ ] 's
@@ -434,11 +434,11 @@ changes:
434434 * ` gid ` {number} Sets the group identity of the process (see setgid(2)).
435435 * ` serialization ` {string} Specify the kind of serialization used for sending
436436 messages between processes. Possible values are ` 'json' ` and ` 'advanced' ` .
437- See [ Advanced Serialization ] [ ] for more details. ** Default:** ` 'json' ` .
437+ See [ Advanced serialization ] [ ] for more details. ** Default:** ` 'json' ` .
438438 * ` shell ` {boolean|string} If ` true ` , runs ` command ` inside of a shell. Uses
439439 ` '/bin/sh' ` on Unix, and ` process.env.ComSpec ` on Windows. A different
440- shell can be specified as a string. See [ Shell Requirements ] [ ] and
441- [ Default Windows Shell ] [ ] . ** Default:** ` false ` (no shell).
440+ shell can be specified as a string. See [ Shell requirements ] [ ] and
441+ [ Default Windows shell ] [ ] . ** Default:** ` false ` (no shell).
442442 * ` windowsVerbatimArguments ` {boolean} No quoting or escaping of arguments is
443443 done on Windows. Ignored on Unix. This is set to ` true ` automatically
444444 when ` shell ` is specified and is CMD. ** Default:** ` false ` .
@@ -699,7 +699,7 @@ see [V8 issue 7381](https://bugs.chromium.org/p/v8/issues/detail?id=7381).
699699
700700See also: [ ` child_process.exec() ` ] [ ] and [ ` child_process.fork() ` ] [ ] .
701701
702- ## Synchronous Process Creation
702+ ## Synchronous process creation
703703
704704The [ ` child_process.spawnSync() ` ] [ ] , [ ` child_process.execSync() ` ] [ ] , and
705705[ ` child_process.execFileSync() ` ] [ ] methods are synchronous and will block the
@@ -755,8 +755,8 @@ changes:
755755 normally be created on Windows systems. ** Default:** ` false ` .
756756 * ` shell ` {boolean|string} If ` true ` , runs ` command ` inside of a shell. Uses
757757 ` '/bin/sh' ` on Unix, and ` process.env.ComSpec ` on Windows. A different
758- shell can be specified as a string. See [ Shell Requirements ] [ ] and
759- [ Default Windows Shell ] [ ] . ** Default:** ` false ` (no shell).
758+ shell can be specified as a string. See [ Shell requirements ] [ ] and
759+ [ Default Windows shell ] [ ] . ** Default:** ` false ` (no shell).
760760* Returns: {Buffer|string} The stdout from the command.
761761
762762The ` child_process.execFileSync() ` method is generally identical to
@@ -804,7 +804,7 @@ changes:
804804 ** Default:** ` 'pipe' ` .
805805 * ` env ` {Object} Environment key-value pairs. ** Default:** ` process.env ` .
806806 * ` shell ` {string} Shell to execute the command with. See
807- [ Shell Requirements ] [ ] and [ Default Windows Shell ] [ ] . ** Default:**
807+ [ Shell requirements ] [ ] and [ Default Windows shell ] [ ] . ** Default:**
808808 ` '/bin/sh' ` on Unix, ` process.env.ComSpec ` on Windows.
809809 * ` uid ` {number} Sets the user identity of the process. (See setuid(2)).
810810 * ` gid ` {number} Sets the group identity of the process. (See setgid(2)).
@@ -884,8 +884,8 @@ changes:
884884 ** Default:** ` 'buffer' ` .
885885 * ` shell ` {boolean|string} If ` true ` , runs ` command ` inside of a shell. Uses
886886 ` '/bin/sh' ` on Unix, and ` process.env.ComSpec ` on Windows. A different
887- shell can be specified as a string. See [ Shell Requirements ] [ ] and
888- [ Default Windows Shell ] [ ] . ** Default:** ` false ` (no shell).
887+ shell can be specified as a string. See [ Shell requirements ] [ ] and
888+ [ Default Windows shell ] [ ] . ** Default:** ` false ` (no shell).
889889 * ` windowsVerbatimArguments ` {boolean} No quoting or escaping of arguments is
890890 done on Windows. Ignored on Unix. This is set to ` true ` automatically
891891 when ` shell ` is specified and is CMD. ** Default:** ` false ` .
@@ -1025,7 +1025,7 @@ message might not be the same as what is originally sent.
10251025If the ` serialization ` option was set to ` 'advanced' ` used when spawning the
10261026child process, the ` message ` argument can contain data that JSON is not able
10271027to represent.
1028- See [ Advanced Serialization ] [ ] for more details.
1028+ See [ Advanced serialization ] [ ] for more details.
10291029
10301030### ` subprocess.channel `
10311031<!-- YAML
@@ -1544,21 +1544,21 @@ This impacts output that includes multibyte character encodings such as UTF-8 or
15441544UTF-16. For instance, ` console.log('中文测试') ` will send 13 UTF-8 encoded bytes
15451545to ` stdout ` although there are only 4 characters.
15461546
1547- ## Shell Requirements
1547+ ## Shell requirements
15481548
15491549The shell should understand the ` -c ` switch. If the shell is ` 'cmd.exe' ` , it
15501550should understand the ` /d /s /c ` switches and command line parsing should be
15511551compatible.
15521552
1553- ## Default Windows Shell
1553+ ## Default Windows shell
15541554
15551555Although Microsoft specifies ` %COMSPEC% ` must contain the path to
15561556` 'cmd.exe' ` in the root environment, child processes are not always subject to
15571557the same requirement. Thus, in ` child_process ` functions where a shell can be
15581558spawned, ` 'cmd.exe' ` is used as a fallback if ` process.env.ComSpec ` is
15591559unavailable.
15601560
1561- ## Advanced Serialization
1561+ ## Advanced serialization
15621562<!-- YAML
15631563added:
15641564 - v13.2.0
@@ -1579,7 +1579,7 @@ Therefore, this feature requires opting in by setting the
15791579` serialization ` option to ` 'advanced' ` when calling [ ` child_process.spawn() ` ] [ ]
15801580or [ ` child_process.fork() ` ] [ ] .
15811581
1582- [ Advanced Serialization ] : #child_process_advanced_serialization
1582+ [ Advanced serialization ] : #child_process_advanced_serialization
15831583[ `'disconnect'` ] : process.html#process_event_disconnect
15841584[ `'error'` ] : #child_process_event_error
15851585[ `'exit'` ] : #child_process_event_exit
@@ -1612,8 +1612,8 @@ or [`child_process.fork()`][].
16121612[ `subprocess.stdio` ] : #child_process_subprocess_stdio
16131613[ `subprocess.stdout` ] : #child_process_subprocess_stdout
16141614[ `util.promisify()` ] : util.html#util_util_promisify_original
1615- [ Default Windows Shell ] : #child_process_default_windows_shell
1615+ [ Default Windows shell ] : #child_process_default_windows_shell
16161616[ HTML structured clone algorithm ] : https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
1617- [ Shell Requirements ] : #child_process_shell_requirements
1617+ [ Shell requirements ] : #child_process_shell_requirements
16181618[ synchronous counterparts ] : #child_process_synchronous_process_creation
16191619[ v8.serdes ] : v8.html#v8_serialization_api
0 commit comments