Browse Source

doc: be specific about the unit of `maxBuffer`

The maxBuffer option was not self-documenting, so document the unit and
its effect.

PR-URL: https://github.com/iojs/io.js/pull/209
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
archived-io.js-v0.12
Tim Ruffles 10 years ago
committed by Ben Noordhuis
parent
commit
6f49c244d1
  1. 19
      doc/api/child_process.markdown

19
doc/api/child_process.markdown

@ -485,7 +485,8 @@ See also: `child_process.exec()` and `child_process.fork()`
understand the `-c` switch on UNIX or `/s /c` on Windows. On Windows, understand the `-c` switch on UNIX or `/s /c` on Windows. On Windows,
command line parsing should be compatible with `cmd.exe`.) command line parsing should be compatible with `cmd.exe`.)
* `timeout` {Number} (Default: 0) * `timeout` {Number} (Default: 0)
* `maxBuffer` {Number} (Default: `200*1024`) * `maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or
stderr - if exceeded child process is killed (Default: `200*1024`)
* `killSignal` {String} (Default: 'SIGTERM') * `killSignal` {String} (Default: 'SIGTERM')
* `uid` {Number} Sets the user identity of the process. (See setuid(2).) * `uid` {Number} Sets the user identity of the process. (See setuid(2).)
* `gid` {Number} Sets the group identity of the process. (See setgid(2).) * `gid` {Number} Sets the group identity of the process. (See setgid(2).)
@ -527,8 +528,8 @@ default options are
If `timeout` is greater than 0, then it will kill the child process If `timeout` is greater than 0, then it will kill the child process
if it runs longer than `timeout` milliseconds. The child process is killed with if it runs longer than `timeout` milliseconds. The child process is killed with
`killSignal` (default: `'SIGTERM'`). `maxBuffer` specifies the largest `killSignal` (default: `'SIGTERM'`). `maxBuffer` specifies the largest
amount of data allowed on stdout or stderr - if this value is exceeded then amount of data (in bytes) allowed on stdout or stderr - if this value is
the child process is killed. exceeded then the child process is killed.
### child_process.execFile(file[, args][, options][, callback]) ### child_process.execFile(file[, args][, options][, callback])
@ -540,7 +541,8 @@ the child process is killed.
* `env` {Object} Environment key-value pairs * `env` {Object} Environment key-value pairs
* `encoding` {String} (Default: 'utf8') * `encoding` {String} (Default: 'utf8')
* `timeout` {Number} (Default: 0) * `timeout` {Number} (Default: 0)
* `maxBuffer` {Number} (Default: 200\*1024) * `maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or
stderr - if exceeded child process is killed (Default: 200\*1024)
* `killSignal` {String} (Default: 'SIGTERM') * `killSignal` {String} (Default: 'SIGTERM')
* `uid` {Number} Sets the user identity of the process. (See setuid(2).) * `uid` {Number} Sets the user identity of the process. (See setuid(2).)
* `gid` {Number} Sets the group identity of the process. (See setgid(2).) * `gid` {Number} Sets the group identity of the process. (See setgid(2).)
@ -612,7 +614,8 @@ configuration at startup.
* `gid` {Number} Sets the group identity of the process. (See setgid(2).) * `gid` {Number} Sets the group identity of the process. (See setgid(2).)
* `timeout` {Number} In milliseconds the maximum amount of time the process is allowed to run. (Default: undefined) * `timeout` {Number} In milliseconds the maximum amount of time the process is allowed to run. (Default: undefined)
* `killSignal` {String} The signal value to be used when the spawned process will be killed. (Default: 'SIGTERM') * `killSignal` {String} The signal value to be used when the spawned process will be killed. (Default: 'SIGTERM')
* `maxBuffer` {Number} * `maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or
stderr - if exceeded child process is killed
* `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: {Object} * return: {Object}
* `pid` {Number} Pid of the child process * `pid` {Number} Pid of the child process
@ -645,7 +648,8 @@ process has exited.
* `gid` {Number} Sets the group identity of the process. (See setgid(2).) * `gid` {Number} Sets the group identity of the process. (See setgid(2).)
* `timeout` {Number} In milliseconds the maximum amount of time the process is allowed to run. (Default: undefined) * `timeout` {Number} In milliseconds the maximum amount of time the process is allowed to run. (Default: undefined)
* `killSignal` {String} The signal value to be used when the spawned process will be killed. (Default: 'SIGTERM') * `killSignal` {String} The signal value to be used when the spawned process will be killed. (Default: 'SIGTERM')
* `maxBuffer` {Number} * `maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or
stderr - if exceeded child process is killed
* `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
@ -675,7 +679,8 @@ throw. The `Error` object will contain the entire result from
* `gid` {Number} Sets the group identity of the process. (See setgid(2).) * `gid` {Number} Sets the group identity of the process. (See setgid(2).)
* `timeout` {Number} In milliseconds the maximum amount of time the process is allowed to run. (Default: undefined) * `timeout` {Number} In milliseconds the maximum amount of time the process is allowed to run. (Default: undefined)
* `killSignal` {String} The signal value to be used when the spawned process will be killed. (Default: 'SIGTERM') * `killSignal` {String} The signal value to be used when the spawned process will be killed. (Default: 'SIGTERM')
* `maxBuffer` {Number} * `maxBuffer` {Number} largest amount of data (in bytes) allowed on stdout or
stderr - if exceeded child process is killed
* `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

Loading…
Cancel
Save