Skip to content

Commit 5031022

Browse files
committed
doc: improve child_process maxBuffer text
`maxBuffer` information in child_process.md used atypical formatting. This uses a single consistent style for all instances of `maxBuffer` information.
1 parent b806e18 commit 5031022

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

doc/api/child_process.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ added: v0.1.90
135135
understand the `-c` switch on UNIX or `/d /s /c` on Windows. On Windows,
136136
command line parsing should be compatible with `cmd.exe`.)
137137
* `timeout` {number} (Default: `0`)
138-
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
139-
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
138+
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
139+
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
140+
See caveat at [`maxBuffer` and Unicode][].
140141
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
141142
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
142143
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
@@ -212,8 +213,9 @@ added: v0.1.91
212213
* `env` {Object} Environment key-value pairs
213214
* `encoding` {string} (Default: `'utf8'`)
214215
* `timeout` {number} (Default: `0`)
215-
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
216-
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
216+
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
217+
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
218+
See caveat at [`maxBuffer` and Unicode][].
217219
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
218220
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
219221
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
@@ -618,8 +620,9 @@ changes:
618620
is allowed to run. (Default: `undefined`)
619621
* `killSignal` {string|integer} The signal value to be used when the spawned
620622
process will be killed. (Default: `'SIGTERM'`)
621-
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
622-
stdout or stderr - if exceeded child process is killed
623+
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
624+
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
625+
See caveat at [`maxBuffer` and Unicode][].
623626
* `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`)
624627
* Returns: {Buffer|string} The stdout from the command
625628

@@ -664,8 +667,9 @@ changes:
664667
is allowed to run. (Default: `undefined`)
665668
* `killSignal` {string|integer} The signal value to be used when the spawned
666669
process will be killed. (Default: `'SIGTERM'`)
667-
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
668-
stdout or stderr - if exceeded child process is killed
670+
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
671+
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
672+
See caveat at [`maxBuffer` and Unicode][].
669673
* `encoding` {string} The encoding used for all stdio inputs and outputs.
670674
(Default: `'buffer'`)
671675
* Returns: {Buffer|string} The stdout from the command
@@ -716,8 +720,9 @@ changes:
716720
is allowed to run. (Default: `undefined`)
717721
* `killSignal` {string|integer} The signal value to be used when the spawned
718722
process will be killed. (Default: `'SIGTERM'`)
719-
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
720-
stdout or stderr - if exceeded child process is killed
723+
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
724+
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
725+
See caveat at [`maxBuffer` and Unicode][].
721726
* `encoding` {string} The encoding used for all stdio inputs and outputs.
722727
(Default: `'buffer'`)
723728
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
@@ -1235,7 +1240,7 @@ to `stdout` although there are only 4 characters.
12351240
[`Error`]: errors.html#errors_class_error
12361241
[`EventEmitter`]: events.html#events_class_eventemitter
12371242
[`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
1238-
[`maxBuffer`]: #child_process_maxbuffer_and_unicode
1243+
[`maxBuffer` and Unicode]: #child_process_maxbuffer_and_unicode
12391244
[`net.Server`]: net.html#net_class_net_server
12401245
[`net.Socket`]: net.html#net_class_net_socket
12411246
[`options.detached`]: #child_process_options_detached

0 commit comments

Comments
 (0)