Skip to content

Commit 5c3f50b

Browse files
lfortinFishrock123
authored andcommitted
doc: rearrange execSync and execFileSync
Changed the ordering so it is in line with the async methods. PR-URL: #2940 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
1 parent 4fc33ac commit 5c3f50b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

doc/api/child_process.markdown

+7-8
Original file line numberDiff line numberDiff line change
@@ -704,10 +704,9 @@ until the process has completely exited. That is to say, if the process handles
704704
the `SIGTERM` signal and doesn't exit, your process will wait until the child
705705
process has exited.
706706

707-
### child_process.execFileSync(file[, args][, options])
707+
### child_process.execSync(command[, options])
708708

709-
* `file` {String} The filename of the program to run
710-
* `args` {Array} List of string arguments
709+
* `command` {String} The command to run
711710
* `options` {Object}
712711
* `cwd` {String} Current working directory of the child process
713712
* `input` {String|Buffer} The value which will be passed as stdin to the spawned process
@@ -725,7 +724,7 @@ process has exited.
725724
* `encoding` {String} The encoding used for all stdio inputs and outputs. (Default: 'buffer')
726725
* return: {Buffer|String} The stdout from the command
727726

728-
`execFileSync` will not return until the child process has fully closed. When a
727+
`execSync` will not return until the child process has fully closed. When a
729728
timeout has been encountered and `killSignal` is sent, the method won't return
730729
until the process has completely exited. That is to say, if the process handles
731730
the `SIGTERM` signal and doesn't exit, your process will wait until the child
@@ -735,10 +734,10 @@ If the process times out, or has a non-zero exit code, this method ***will***
735734
throw. The `Error` object will contain the entire result from
736735
[`child_process.spawnSync`](#child_process_child_process_spawnsync_command_args_options)
737736

737+
### child_process.execFileSync(file[, args][, options])
738738

739-
### child_process.execSync(command[, options])
740-
741-
* `command` {String} The command to run
739+
* `file` {String} The filename of the program to run
740+
* `args` {Array} List of string arguments
742741
* `options` {Object}
743742
* `cwd` {String} Current working directory of the child process
744743
* `input` {String|Buffer} The value which will be passed as stdin to the spawned process
@@ -756,7 +755,7 @@ throw. The `Error` object will contain the entire result from
756755
* `encoding` {String} The encoding used for all stdio inputs and outputs. (Default: 'buffer')
757756
* return: {Buffer|String} The stdout from the command
758757

759-
`execSync` will not return until the child process has fully closed. When a
758+
`execFileSync` will not return until the child process has fully closed. When a
760759
timeout has been encountered and `killSignal` is sent, the method won't return
761760
until the process has completely exited. That is to say, if the process handles
762761
the `SIGTERM` signal and doesn't exit, your process will wait until the child

0 commit comments

Comments
 (0)