child_process: preserve argument type#7391
Conversation
lib/child_process.js
Outdated
There was a problem hiding this comment.
Can you at least line these two lines up with chunk? Same for the other instance of this below.
35485cd to
4c7266b
Compare
|
Looks like the |
|
@mscdex Whoops, yeah, fixed, I hope, let's try again... |
|
CI looks good. /cc @bnoordhuis @cjihrig |
lib/child_process.js
Outdated
There was a problem hiding this comment.
Can you drop the negation and flip the clauses?
This reverts commit c9a5990.
A previous fix for a `maxBuffer` bug resulted in a change to the argument type for the `data` event on `child.stdin` and `child.stdout` when using `child_process.exec()`. This fixes the `maxBuffer` bug in a way that does not have that side effect. Fixes: nodejs#7342 Refs: nodejs#1901
|
CI again, hoping my |
|
Modified tests for Windows. Let's try again: |
|
That CI is green. Woot. @bnoordhuis I put quotation marks around |
|
LGTM
I agree. |
|
/cc @cjihrig @JacksonTian |
|
I'll land this in 24 hours if no one objects. An additional |
A previous fix for a `maxBuffer` bug resulted in a change to the argument type for the `data` event on `child.stdin` and `child.stdout` when using `child_process.exec()`. This fixes the `maxBuffer` bug in a way that does not have that side effect. PR-URL: #7391 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Fixes: #7342 Refs: #1901
|
@Trott lts? |
|
@thealphanerd Yes if #6764 lands on LTS, otherwise no. |
|
I've gone ahead and landed this as #6764 landed. Do you think we would be better without either of these changes? Is there any chance of a regression? |
A previous fix for a `maxBuffer` bug resulted in a change to the argument type for the `data` event on `child.stdin` and `child.stdout` when using `child_process.exec()`. This fixes the `maxBuffer` bug in a way that does not have that side effect. PR-URL: #7391 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Fixes: #7342 Refs: #1901
|
@thealphanerd I think we're better off with these changes than without them. |
A previous fix for a `maxBuffer` bug resulted in a change to the argument type for the `data` event on `child.stdin` and `child.stdout` when using `child_process.exec()`. This fixes the `maxBuffer` bug in a way that does not have that side effect. PR-URL: #7391 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Fixes: #7342 Refs: #1901
A previous fix for a `maxBuffer` bug resulted in a change to the argument type for the `data` event on `child.stdin` and `child.stdout` when using `child_process.exec()`. This fixes the `maxBuffer` bug in a way that does not have that side effect. PR-URL: #7391 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Fixes: #7342 Refs: #1901
A previous fix for a `maxBuffer` bug resulted in a change to the argument type for the `data` event on `child.stdin` and `child.stdout` when using `child_process.exec()`. This fixes the `maxBuffer` bug in a way that does not have that side effect. PR-URL: #7391 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Fixes: #7342 Refs: #1901
Checklist
make -j4 test(UNIX) orvcbuild test nosign(Windows) passesAffected core subsystem(s)
child_process
Description of change
A previous fix for a
maxBufferbug resulted in a change to theargument type for the
dataevent onchild.stdinandchild.stdoutwhen using
child_process.exec().This fixes the
maxBufferbug in a way that does not have that sideeffect.
Fixes: #7342
Refs: #1901
Alternative to #7381 (which changes the argument type and is arguably
semver-majorfor that reason--being affected by it requires relying on undocumented behavior and usingexec()in ways that are better suited tofork()orspawn()which are unaffected by either fix).