Uh oh!
There was an error while loading. Please reload this page.
child_process: Allow an unlimited maxBuffer size in child_process - #10767
child_process: Allow an unlimited maxBuffer size in child_process#10767jwdeitch wants to merge 1 commit into
Conversation
mscdex
commented
Jan 12, 2017
This isn't necessary, just pass |
cjihrig
commented
Jan 12, 2017
Yes, what @mscdex said. Also, this patch doesn't address |
addaleax
commented
Jan 12, 2017
Fwiw, passing |
cjihrig
commented
Jan 12, 2017
That should only happen for |
addaleax
commented
Jan 12, 2017
I tested this as: >child_process.execSync('cat /dev/urandom',{maxBuffer:Infinity})
TypeError: "maxBuffer"mustbeanunsignedinteger |
cjihrig
commented
Jan 12, 2017
Yea, |
I think allowing That Infinity is valid isn't documented anywhere, and apparently, its support is random: yes for execFile, no for spawnSync, and for execFileSync, who knows? Is that accidental, or intentional? And Hm. EDIT: #10768 execFileSync also doesn't document a default for maxBuffer, its not clear if its defaulting to no limit, or to something else. |
mscdex
commented
Jan 12, 2017
I don't know why the sync counterparts perform different argument checking. I'd personally prefer simpler validation, that the value is just a number ( |
sam-github
commented
Jan 12, 2017
Btw, rebuilding to see if the abort is reproduceable. |
The sync calls don't currently support it because it is CHECK()'ed as a uint in C++. |
cjihrig
commented
Jan 12, 2017
Fixes: nodejs#10767 PR-URL: nodejs#10769 Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: nodejs#10767 PR-URL: nodejs#10769 Reviewed-By: James M Snell <jasnell@gmail.com>
Allow unlimited buffer for child_process'
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
child_process