Skip to content

Commit

Permalink
child_process: increase default maxBuffer
Browse files Browse the repository at this point in the history
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
  • Loading branch information
seppevs committed Mar 27, 2017
1 parent 88daf88 commit fefd78a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ added: v0.1.90
command line parsing should be compatible with `cmd.exe`.)
* `timeout` {number} (Default: `0`)
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
stderr. (Default: `200*1024`) If exceeded, the child process is terminated.
stderr. (Default: `1024*1024`) If exceeded, the child process is terminated.
See caveat at [`maxBuffer` and Unicode][].
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
Expand Down
2 changes: 1 addition & 1 deletion lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ exports.execFile = function(file /*, args, options, callback*/) {
var options = {
encoding: 'utf8',
timeout: 0,
maxBuffer: 200 * 1024,
maxBuffer: 1024 * 1024,
killSignal: 'SIGTERM',
cwd: null,
env: null,
Expand Down

0 comments on commit fefd78a

Please sign in to comment.