You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maxBuffer specifies the largest amount of data allowed on stdout or stderr - if this value is exceeded then the child process is killed
and I assume this also apply to child_process.execFile, child_process.spawnSync, child_process.execFileSync and child_process.execSync, since all of them has the maxBuffer option.
To create scripts that exec commands that give a HUGE output (like make) this can be a problem, specially since you don't know how big they can be and at the same time, you are not worried to store their output (showing it on the console it's usually enough) and also they would waste a lot of memory in useless data, so I propose to add an option to don't buffer the output at all. A good way to enable this is to set maxBuffer to a negative number (a special case of maxNumber = 0 would be still a valid value when you don't expect the command to give an output at all, and if so it's due to an error...).
The text was updated successfully, but these errors were encountered:
(This is a duplicate issue also reported on Node.js repository)
The child_process.exec documentation says:
and I assume this also apply to
child_process.execFile
,child_process.spawnSync
,child_process.execFileSync
andchild_process.execSync
, since all of them has themaxBuffer
option.To create scripts that exec commands that give a HUGE output (like
make
) this can be a problem, specially since you don't know how big they can be and at the same time, you are not worried to store their output (showing it on the console it's usually enough) and also they would waste a lot of memory in useless data, so I propose to add an option to don't buffer the output at all. A good way to enable this is to setmaxBuffer
to a negative number (a special case ofmaxNumber = 0
would be still a valid value when you don't expect the command to give an output at all, and if so it's due to an error...).The text was updated successfully, but these errors were encountered: