Browse Source

doc: rearrange execSync and execFileSync

Changed the ordering so it is in line with the async methods.

PR-URL: https://github.com/nodejs/node/pull/2940
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
v4.x
Laurent Fortin 10 years ago
committed by Jeremiah Senkpiel
parent
commit
5c3f50b21d
  1. 15
      doc/api/child_process.markdown

15
doc/api/child_process.markdown

@ -704,10 +704,9 @@ until the process has completely exited. That is to say, if the process handles
the `SIGTERM` signal and doesn't exit, your process will wait until the child the `SIGTERM` signal and doesn't exit, your process will wait until the child
process has exited. process has exited.
### child_process.execFileSync(file[, args][, options]) ### child_process.execSync(command[, options])
* `file` {String} The filename of the program to run * `command` {String} The command to run
* `args` {Array} List of string arguments
* `options` {Object} * `options` {Object}
* `cwd` {String} Current working directory of the child process * `cwd` {String} Current working directory of the child process
* `input` {String|Buffer} The value which will be passed as stdin to the spawned process * `input` {String|Buffer} The value which will be passed as stdin to the spawned process
@ -725,7 +724,7 @@ process has exited.
* `encoding` {String} The encoding used for all stdio inputs and outputs. (Default: 'buffer') * `encoding` {String} The encoding used for all stdio inputs and outputs. (Default: 'buffer')
* return: {Buffer|String} The stdout from the command * return: {Buffer|String} The stdout from the command
`execFileSync` will not return until the child process has fully closed. When a `execSync` will not return until the child process has fully closed. When a
timeout has been encountered and `killSignal` is sent, the method won't return timeout has been encountered and `killSignal` is sent, the method won't return
until the process has completely exited. That is to say, if the process handles until the process has completely exited. That is to say, if the process handles
the `SIGTERM` signal and doesn't exit, your process will wait until the child 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***
throw. The `Error` object will contain the entire result from throw. The `Error` object will contain the entire result from
[`child_process.spawnSync`](#child_process_child_process_spawnsync_command_args_options) [`child_process.spawnSync`](#child_process_child_process_spawnsync_command_args_options)
### child_process.execFileSync(file[, args][, options])
### child_process.execSync(command[, options]) * `file` {String} The filename of the program to run
* `args` {Array} List of string arguments
* `command` {String} The command to run
* `options` {Object} * `options` {Object}
* `cwd` {String} Current working directory of the child process * `cwd` {String} Current working directory of the child process
* `input` {String|Buffer} The value which will be passed as stdin to the spawned process * `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
* `encoding` {String} The encoding used for all stdio inputs and outputs. (Default: 'buffer') * `encoding` {String} The encoding used for all stdio inputs and outputs. (Default: 'buffer')
* return: {Buffer|String} The stdout from the command * return: {Buffer|String} The stdout from the command
`execSync` will not return until the child process has fully closed. When a `execFileSync` will not return until the child process has fully closed. When a
timeout has been encountered and `killSignal` is sent, the method won't return timeout has been encountered and `killSignal` is sent, the method won't return
until the process has completely exited. That is to say, if the process handles until the process has completely exited. That is to say, if the process handles
the `SIGTERM` signal and doesn't exit, your process will wait until the child the `SIGTERM` signal and doesn't exit, your process will wait until the child

Loading…
Cancel
Save