-
Notifications
You must be signed in to change notification settings - Fork 7.3k
child_process: exec should return Buffers by default #5833
Comments
Just to clarify the The return value will continue to be a child process object |
Fixed by #5846 |
@trevnorris I believe this has regressed:
Docs still indicate that |
@trevnorris looking at the patch's code, it has landed:
However, it still isn't correct with the docs. The docs say that they should always be Buffers, not just Buffers when Either the code needs to change, or the docs need to change. |
@joyent/node-coreteam Thoughts on this. Do we update the code or the docs? @balupton Thanks for bringing this to attention. |
From my perspective it makes sense to return buffers then encoding is null. |
@trevnorris My opinion is that, unless not returning buffers when no encoding is specified is a bug that breaks users, it should be a documentation change in v0.12. However, if we think that it's ultimately what we want, we should also submit a PR against master that makes |
@piscisaureus When @misterdjules Honestly not sure how I take this. We have no test for it, and it's been broken for some time, but doesn't seem to be affecting many, if any, users. So doc change in v0.12? |
@trevnorris Yes, let's do a doc change for v0.12. And if we still think that not specifying an encoding should eventually pass buffers to the callback, then let's do that in master, but we'll need an issue to track that unless we do it right away. |
Right now return values from
child_process.exec()
default toutf8
. Instead the return value should be a buffer.Side: Check
maxBuffer
in options to ensure it's not larger than Buffer will allow.The text was updated successfully, but these errors were encountered: