joyent/node — pull request #5846 by mojodna (2013-07-13 23:51:55+00:00)
Title: Callback with Buffers from child_process.exec

The [`child_process` docs](http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) say that `child_process.exec`'s callback should be passed stdout and stderr as `Buffers`. However, even when a `null` `encoding` is provided, `stdout` and `stderr` are both strings.

This patch modifies `child_process.execFile` so that it only returns strings when `encoding` isn't `null`.