| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Why this change?
Sorry, something went wrong.
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...
Sorry, something went wrong.
There was a problem hiding this comment.
Fixed. Thanks!
Sorry, something went wrong.
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
|
Closing in favor of non-semver-major #7391 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Checklist
Affected 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 maxBuffer option of child_process.exec() in bytes (per the documentation and user expectations) and not characters.
Unfortunately, the fix had a side effect such the child.stdout and child.stderr data events 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-major and tests are added to confirm the behavior change.