Skip to content

Commit 6cc7b30

Browse files
Trottitaloacasas
authored andcommitted
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. PR-URL: #11791 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 188cbc6 commit 6cc7b30

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

doc/api/child_process.md

+16-11
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).)
@@ -612,8 +614,9 @@ changes:
612614
is allowed to run. (Default: `undefined`)
613615
* `killSignal` {string|integer} The signal value to be used when the spawned
614616
process will be killed. (Default: `'SIGTERM'`)
615-
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
616-
stdout or stderr - if exceeded child process is killed
617+
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
618+
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
619+
See caveat at [`maxBuffer` and Unicode][].
617620
* `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`)
618621
* Returns: {Buffer|string} The stdout from the command
619622

@@ -654,8 +657,9 @@ added: v0.11.12
654657
is allowed to run. (Default: `undefined`)
655658
* `killSignal` {string|integer} The signal value to be used when the spawned
656659
process will be killed. (Default: `'SIGTERM'`)
657-
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
658-
stdout or stderr - if exceeded child process is killed
660+
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
661+
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
662+
See caveat at [`maxBuffer` and Unicode][].
659663
* `encoding` {string} The encoding used for all stdio inputs and outputs.
660664
(Default: `'buffer'`)
661665
* Returns: {Buffer|string} The stdout from the command
@@ -703,8 +707,9 @@ changes:
703707
is allowed to run. (Default: `undefined`)
704708
* `killSignal` {string|integer} The signal value to be used when the spawned
705709
process will be killed. (Default: `'SIGTERM'`)
706-
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
707-
stdout or stderr - if exceeded child process is killed
710+
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
711+
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
712+
See caveat at [`maxBuffer` and Unicode][].
708713
* `encoding` {string} The encoding used for all stdio inputs and outputs.
709714
(Default: `'buffer'`)
710715
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
@@ -1222,7 +1227,7 @@ to `stdout` although there are only 4 characters.
12221227
[`Error`]: errors.html#errors_class_error
12231228
[`EventEmitter`]: events.html#events_class_eventemitter
12241229
[`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
1225-
[`maxBuffer`]: #child_process_maxbuffer_and_unicode
1230+
[`maxBuffer` and Unicode]: #child_process_maxbuffer_and_unicode
12261231
[`net.Server`]: net.html#net_class_net_server
12271232
[`net.Socket`]: net.html#net_class_net_socket
12281233
[`options.detached`]: #child_process_options_detached

0 commit comments

Comments
 (0)