Skip to content

Commit

Permalink
doc: clarify child_process stdout/stderr types
Browse files Browse the repository at this point in the history
Clarify how the encoding option interacts with the data
type of child process stdout and stderr.

Fixes: #6666
PR-URL: #7361
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
sartrey authored and cjihrig committed Jun 27, 2016
1 parent 9d56c40 commit 926707f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ The `stdout` and `stderr` arguments passed to the callback will contain the
stdout and stderr output of the child process. By default, Node.js will decode
the output as UTF-8 and pass strings to the callback. The `encoding` option
can be used to specify the character encoding used to decode the stdout and
stderr output. If `encoding` is `'buffer'`, `Buffer` objects will be passed to
the callback instead.
stderr output. If `encoding` is `'buffer'`, or an unrecognized character
encoding, `Buffer` objects will be passed to the callback instead.

The `options` argument may be passed as the second argument to customize how
the process is spawned. The default options are:
Expand Down Expand Up @@ -233,8 +233,8 @@ The `stdout` and `stderr` arguments passed to the callback will contain the
stdout and stderr output of the child process. By default, Node.js will decode
the output as UTF-8 and pass strings to the callback. The `encoding` option
can be used to specify the character encoding used to decode the stdout and
stderr output. If `encoding` is `'buffer'`, `Buffer` objects will be passed to
the callback instead.
stderr output. If `encoding` is `'buffer'`, or an unrecognized character
encoding, `Buffer` objects will be passed to the callback instead.

### child_process.fork(modulePath[, args][, options])
<!-- YAML
Expand Down

0 comments on commit 926707f

Please sign in to comment.