Skip to content

Commit fefd78a

Browse files
committed
child_process: increase default maxBuffer
Increase the default maxBuffer for child_process.exec from 200 * 1024 bytes to 1024 KB so child processes don't get terminated too soon. This is a fix for #9829
1 parent 88daf88 commit fefd78a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/api/child_process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ added: v0.1.90
136136
command line parsing should be compatible with `cmd.exe`.)
137137
* `timeout` {number} (Default: `0`)
138138
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
139-
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
139+
stderr. (Default: `1024*1024`) If exceeded, the child process is terminated.
140140
See caveat at [`maxBuffer` and Unicode][].
141141
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
142142
* `uid` {number} Sets the user identity of the process. (See setuid(2).)

lib/child_process.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ exports.execFile = function(file /*, args, options, callback*/) {
146146
var options = {
147147
encoding: 'utf8',
148148
timeout: 0,
149-
maxBuffer: 200 * 1024,
149+
maxBuffer: 1024 * 1024,
150150
killSignal: 'SIGTERM',
151151
cwd: null,
152152
env: null,

0 commit comments

Comments
 (0)