Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

child_process.exec doc is inconsistent with actual implementation #9434

Closed
misterdjules opened this issue Mar 18, 2015 · 2 comments
Closed

Comments

@misterdjules
Copy link

child_process.exec' documentation states that the stdout and stderr parameters are instances of Buffer by default, but it's actually not the case. They are instances of Buffer only if { encoding: null} is passed as options.

The documentation of v0.12.x should be fixed to reflect this behavior.

The original intent was that stdout and stderr parameters would be instances of Buffer. If that still holds true, then the change in behavior should be done in master post v0.12.x.

Adding to milestone 0.12.2 as it's a quick change.

@tyleranton
Copy link

@misterdjules I can grab this.

@misterdjules
Copy link
Author

@tyleranton That's great 👍 Please do and submit a PR when you're ready. Also feel free to ping me on #libuv if you need help. Thank you!

@misterdjules misterdjules modified the milestones: 0.12.3, 0.12.2 Apr 1, 2015
@misterdjules misterdjules modified the milestones: 0.12.3, 0.12.4 May 14, 2015
@misterdjules misterdjules modified the milestones: 0.12.4, 0.12.5 May 25, 2015
@misterdjules misterdjules modified the milestones: 0.12.5, 0.12.6 Jun 22, 2015
@misterdjules misterdjules modified the milestones: 0.12.6, 0.12.7, 0.12.8 Jul 6, 2015
@misterdjules misterdjules modified the milestones: 0.12.8, 0.12.7 Jul 10, 2015
jasnell pushed a commit that referenced this issue Aug 28, 2015
Changed child_process.exec documentation to reflect that the parameters stdout and stderr are instances of Buffer only if {encoding: null}. Otherwise, they are instances of String with the encoding.

Fixes #9434

removed .DS_Store

PR-URL: #14088
Reviewed-By: jasnell - James M Snell <[email protected]>
Reviewed-By: piscisaureus - Bert Belder <[email protected]>
jBarz pushed a commit to ibmruntimes/node that referenced this issue Nov 4, 2016
Changed child_process.exec documentation to reflect that the parameters stdout and stderr are instances of Buffer only if {encoding: null}. Otherwise, they are instances of String with the encoding.

Fixes nodejs#9434

removed .DS_Store

PR-URL: nodejs#14088
Reviewed-By: jasnell - James M Snell <[email protected]>
Reviewed-By: piscisaureus - Bert Belder <[email protected]>
@Trott Trott closed this as completed Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants