summaryrefslogtreecommitdiff
path: root/doc/api/child_process.md
diff options
context:
space:
mode:
authorJeremiah Senkpiel <fishrock123@rocketmail.com>2018-12-10 16:34:32 -0800
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2019-01-23 15:45:46 -0800
commite47f972d6851b3196b3b2ba611929f25a5fcadb6 (patch)
tree029dfbf0f302224763c6e541d0909b86c87ef0c6 /doc/api/child_process.md
parent5f866821adf71ff3ed909d4be8c808197663c110 (diff)
downloadandroid-node-v8-e47f972d6851b3196b3b2ba611929f25a5fcadb6.tar.gz
android-node-v8-e47f972d6851b3196b3b2ba611929f25a5fcadb6.tar.bz2
android-node-v8-e47f972d6851b3196b3b2ba611929f25a5fcadb6.zip
child_process: truncate output when maxBuffer is exceeded
Preserves truncated output for `child_process.exec()` when `maxBuffer` is exceeded. This is particularly useful for commands which have indistinguishable error codes for what output they produce. PR-URL: https://github.com/nodejs/node/pull/24951 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/api/child_process.md')
-rw-r--r--doc/api/child_process.md20
1 files changed, 12 insertions, 8 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index e32568cd78..cdfdab1a98 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -147,8 +147,9 @@ changes:
`'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows.
* `timeout` {number} **Default:** `0`
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
- stderr. If exceeded, the child process is terminated. See caveat at
- [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`.
+ stderr. If exceeded, the child process is terminated and any output is
+ truncated. See caveat at [`maxBuffer` and Unicode][].
+ **Default:** `200 * 1024`.
* `killSignal` {string|integer} **Default:** `'SIGTERM'`
* `uid` {number} Sets the user identity of the process (see setuid(2)).
* `gid` {number} Sets the group identity of the process (see setgid(2)).
@@ -245,8 +246,9 @@ changes:
* `encoding` {string} **Default:** `'utf8'`
* `timeout` {number} **Default:** `0`
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
- stderr. If exceeded, the child process is terminated. See caveat at
- [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`.
+ stderr. If exceeded, the child process is terminated and any output is
+ truncated. See caveat at [`maxBuffer` and Unicode][].
+ **Default:** `200 * 1024`.
* `killSignal` {string|integer} **Default:** `'SIGTERM'`
* `uid` {number} Sets the user identity of the process (see setuid(2)).
* `gid` {number} Sets the group identity of the process (see setgid(2)).
@@ -779,8 +781,9 @@ changes:
* `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. **Default:** `'SIGTERM'`.
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
- stderr. If exceeded, the child process is terminated. See caveat at
- [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`.
+ stderr. If exceeded, the child process is terminated and any output is
+ truncated. See caveat at [`maxBuffer` and Unicode][].
+ **Default:** `200 * 1024`.
* `encoding` {string} The encoding used for all stdio inputs and outputs.
**Default:** `'buffer'`.
* `windowsHide` {boolean} Hide the subprocess console window that would
@@ -842,8 +845,9 @@ changes:
* `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. **Default:** `'SIGTERM'`.
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
- stderr. If exceeded, the child process is terminated. See caveat at
- [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`.
+ stderr. If exceeded, the child process is terminated and any output is
+ truncated. See caveat at [`maxBuffer` and Unicode][].
+ **Default:** `200 * 1024`.
* `encoding` {string} The encoding used for all stdio inputs and outputs.
**Default:** `'buffer'`.
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses