@@ -41,7 +41,7 @@ the event loop until the spawned process either exits or is terminated.
41
41
42
42
For convenience, the ` child_process ` module provides a handful of synchronous
43
43
and asynchronous alternatives to [ ` child_process.spawn() ` ] [ ] and
44
- [ ` child_process.spawnSync() ` ] [ ] . * Note that each of these alternatives are
44
+ [ ` child_process.spawnSync() ` ] [ ] . * Note that each of these alternatives are
45
45
implemented on top of [ ` child_process.spawn() ` ] [ ] or [ ` child_process.spawnSync() ` ] [ ] .*
46
46
47
47
* [ ` child_process.exec() ` ] [ ] : spawns a shell and runs a command within that shell,
@@ -146,8 +146,8 @@ changes:
146
146
[ Shell Requirements] [ ] and [ Default Windows Shell] [ ] .
147
147
* ` timeout ` {number} ** Default:** ` 0 `
148
148
* ` maxBuffer ` {number} Largest amount of data in bytes allowed on stdout or
149
- stderr. ** Default: ** ` 200*1024 ` . If exceeded, the child process is terminated.
150
- See caveat at [ ` maxBuffer ` and Unicode] [ ] .
149
+ stderr. If exceeded, the child process is terminated. See caveat at
150
+ [ ` maxBuffer ` and Unicode] [ ] . ** Default: ** ` 200 * 1024 ` .
151
151
* ` killSignal ` {string|integer} ** Default:** ` 'SIGTERM' `
152
152
* ` uid ` {number} Sets the user identity of the process (see setuid(2)).
153
153
* ` gid ` {number} Sets the group identity of the process (see setgid(2)).
@@ -189,7 +189,7 @@ exec('cat *.js bad_file | wc -l', (error, stdout, stderr) => {
189
189
```
190
190
191
191
If a ` callback ` function is provided, it is called with the arguments
192
- ` (error, stdout, stderr) ` . On success, ` error ` will be ` null ` . On error,
192
+ ` (error, stdout, stderr) ` . On success, ` error ` will be ` null ` . On error,
193
193
` error ` will be an instance of [ ` Error ` ] [ ] . The ` error.code ` property will be
194
194
the exit code of the child process while ` error.signal ` will be set to the
195
195
signal that terminated the process. Any exit code other than ` 0 ` is considered
@@ -258,8 +258,8 @@ changes:
258
258
* ` encoding ` {string} ** Default:** ` 'utf8' `
259
259
* ` timeout ` {number} ** Default:** ` 0 `
260
260
* ` maxBuffer ` {number} Largest amount of data in bytes allowed on stdout or
261
- stderr. ** Default: ** ` 200*1024 ` If exceeded, the child process is terminated.
262
- See caveat at [ ` maxBuffer ` and Unicode] [ ] .
261
+ stderr. If exceeded, the child process is terminated. See caveat at
262
+ [ ` maxBuffer ` and Unicode] [ ] . ** Default: ** ` 200 * 1024 ` .
263
263
* ` killSignal ` {string|integer} ** Default:** ` 'SIGTERM' `
264
264
* ` uid ` {number} Sets the user identity of the process (see setuid(2)).
265
265
* ` gid ` {number} Sets the group identity of the process (see setgid(2)).
@@ -538,7 +538,7 @@ disabled*.
538
538
On non-Windows platforms, if ` options.detached ` is set to ` true ` , the child
539
539
process will be made the leader of a new process group and session. Note that
540
540
child processes may continue running after the parent exits regardless of
541
- whether they are detached or not. See setsid(2) for more information.
541
+ whether they are detached or not. See setsid(2) for more information.
542
542
543
543
By default, the parent will wait for the detached child to exit. To prevent
544
544
the parent from waiting for a given ` subprocess ` , use the ` subprocess.unref() `
@@ -712,9 +712,10 @@ changes:
712
712
* ` killSignal ` {string|integer} The signal value to be used when the spawned
713
713
process will be killed. ** Default:** ` 'SIGTERM' `
714
714
* ` maxBuffer ` {number} Largest amount of data in bytes allowed on stdout or
715
- stderr. ** Default:** ` 200*1024 ` If exceeded, the child process is terminated.
716
- See caveat at [ ` maxBuffer ` and Unicode] [ ] .
717
- * ` encoding ` {string} The encoding used for all stdio inputs and outputs. ** Default:** ` 'buffer' `
715
+ stderr. If exceeded, the child process is terminated. See caveat at
716
+ [ ` maxBuffer ` and Unicode] [ ] . ** Default:** ` 200 * 1024 ` .
717
+ * ` encoding ` {string} The encoding used for all stdio inputs and outputs.
718
+ ** Default:** ` 'buffer' ` .
718
719
* ` windowsHide ` {boolean} Hide the subprocess console window that would
719
720
normally be created on Windows systems. ** Default:** ` false ` .
720
721
* ` shell ` {boolean|string} If ` true ` , runs ` command ` inside of a shell. Uses
@@ -773,8 +774,8 @@ changes:
773
774
* ` killSignal ` {string|integer} The signal value to be used when the spawned
774
775
process will be killed. ** Default:** ` 'SIGTERM' `
775
776
* ` maxBuffer ` {number} Largest amount of data in bytes allowed on stdout or
776
- stderr. ** Default: ** ` 200*1024 ` If exceeded, the child process is terminated.
777
- See caveat at [ ` maxBuffer ` and Unicode] [ ] .
777
+ stderr. If exceeded, the child process is terminated. See caveat at
778
+ [ ` maxBuffer ` and Unicode] [ ] . ** Default: ** ` 200 * 1024 ` .
778
779
* ` encoding ` {string} The encoding used for all stdio inputs and outputs.
779
780
** Default:** ` 'buffer' `
780
781
* ` windowsHide ` {boolean} Hide the subprocess console window that would
@@ -785,12 +786,12 @@ The `child_process.execSync()` method is generally identical to
785
786
[ ` child_process.exec() ` ] [ ] with the exception that the method will not return until
786
787
the child process has fully closed. When a timeout has been encountered and
787
788
` killSignal ` is sent, the method won't return until the process has completely
788
- exited. * Note that if the child process intercepts and handles the ` SIGTERM `
789
+ exited. * Note that if the child process intercepts and handles the ` SIGTERM `
789
790
signal and doesn't exit, the parent process will wait until the child
790
791
process has exited.*
791
792
792
793
If the process times out or has a non-zero exit code, this method *** will***
793
- throw. The [ ` Error ` ] [ ] object will contain the entire result from
794
+ throw. The [ ` Error ` ] [ ] object will contain the entire result from
794
795
[ ` child_process.spawnSync() ` ] [ ]
795
796
796
797
** Never pass unsanitized user input to this function. Any input containing shell
@@ -830,8 +831,8 @@ changes:
830
831
* ` killSignal ` {string|integer} The signal value to be used when the spawned
831
832
process will be killed. ** Default:** ` 'SIGTERM' `
832
833
* ` maxBuffer ` {number} Largest amount of data in bytes allowed on stdout or
833
- stderr. ** Default: ** ` 200*1024 ` If exceeded, the child process is terminated.
834
- See caveat at [ ` maxBuffer ` and Unicode] [ ] .
834
+ stderr. If exceeded, the child process is terminated. See caveat at
835
+ [ ` maxBuffer ` and Unicode] [ ] . ** Default: ** ` 200 * 1024 ` .
835
836
* ` encoding ` {string} The encoding used for all stdio inputs and outputs.
836
837
** Default:** ` 'buffer' `
837
838
* ` shell ` {boolean|string} If ` true ` , runs ` command ` inside of a shell. Uses
@@ -1168,7 +1169,7 @@ properties:
1168
1169
Defaults to ` false ` .
1169
1170
1170
1171
The optional ` callback ` is a function that is invoked after the message is
1171
- sent but before the child may have received it. The function is called with a
1172
+ sent but before the child may have received it. The function is called with a
1172
1173
single argument: ` null ` on success, or an [ ` Error ` ] [ ] object on failure.
1173
1174
1174
1175
If no ` callback ` function is provided and the message cannot be sent, an
0 commit comments