-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
child_process: Allow an unlimited maxBuffer size in child_process #10767
Conversation
This isn't necessary, just pass |
Yes, what @mscdex said. Also, this patch doesn't address |
Fwiw, passing |
That should only happen for |
I tested this as: > child_process.execSync('cat /dev/urandom', {maxBuffer:Infinity})
TypeError: "maxBuffer" must be an unsigned integer |
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. |
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 ( |
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++. |
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