child_process: measure buffer length in bytes#7381
Closed
Trott wants to merge 8 commits intonodejs:masterfrom
Closed
child_process: measure buffer length in bytes#7381Trott wants to merge 8 commits intonodejs:masterfrom
Trott wants to merge 8 commits intonodejs:masterfrom
Conversation
Member
Author
There was a problem hiding this comment.
Merge error on my part that undoes a change that came in after the commit I reverted. Will fix it momentarily...
This reverts commit c9a5990.
This change fixes a known issue where `maxBuffer` limits by characters rather than bytes. Benchmark added to confirm no performance regression occurs with this change. This necessarily changes default behavior of `stdout` and `stderr` callbacks such that they receive buffers rather than strings. The alternative would be a performance hit on the defaults. Refs: nodejs#6764 Refs: nodejs#1901
This was referenced Jun 23, 2016
Member
Author
|
Closing in favor of non-semver-major #7391 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX) orvcbuild test nosign(Windows) passesAffected core subsystem(s)
child_process
Description of change
This re-implements a previous fix that had to be reverted. The fix is to measure the
maxBufferoption ofchild_process.exec()in bytes (per the documentation and user expectations) and not characters.Unfortunately, the fix had a side effect such the
child.stdoutandchild.stderrdataevents sent their callbacks buffers by default rather than strings. This is undocumented but fully exposed and caused bugs in userland (e.g., https://github.com/tes/bosco/issues/152).This PR depends on #7377. It re-implements the change, but this time it is marked
semver-majorand tests are added to confirm the behavior change.