@@ -130,8 +130,8 @@ exec('my.bat', (err, stdout, stderr) => {
130130  *  ` gid `  {Number} Sets the group identity of the process. (See setgid(2).)
131131*  ` callback `  {Function} called with the output when process terminates
132132  *  ` error `  {Error}
133-   *  ` stdout `  {Buffer}
134-   *  ` stderr `  {Buffer}
133+   *  ` stdout `  {String| Buffer}
134+   *  ` stderr `  {String| Buffer}
135135*  Return: {ChildProcess}
136136
137137Spawns a shell then executes the ` command `  within that shell, buffering any
@@ -156,6 +156,13 @@ the exit code of the child process while `error.signal` will be set to the
156156signal that terminated the process. Any exit code other than ` 0 `  is considered
157157to be an error.
158158
159+ The ` stdout `  and ` stderr `  arguments passed to the callback will contain the
160+ stdout and stderr output of the child process. By default, Node.js will decode
161+ the output as UTF-8 and pass strings to the callback. The ` encoding `  option
162+ can be used to specify the character encoding used to decode the stdout and
163+ stderr output. If ` encoding `  is ` 'buffer' ` , ` Buffer `  objects will be passed to
164+ the callback instead.
165+ 
159166The ` options `  argument may be passed as the second argument to customize how
160167the process is spawned. The default options are:
161168
@@ -197,8 +204,8 @@ replace the existing process and uses a shell to execute the command.*
197204  *  ` gid `  {Number} Sets the group identity of the process. (See setgid(2).)
198205*  ` callback `  {Function} called with the output when process terminates
199206  *  ` error `  {Error}
200-   *  ` stdout `  {Buffer}
201-   *  ` stderr `  {Buffer}
207+   *  ` stdout `  {String| Buffer}
208+   *  ` stderr `  {String| Buffer}
202209*  Return: {ChildProcess}
203210
204211The ` child_process.execFile() `  function is similar to [ ` child_process.exec() ` ] [ ] 
@@ -219,6 +226,13 @@ const child = execFile('node', ['--version'], (error, stdout, stderr) => {
219226});
220227``` 
221228
229+ The ` stdout `  and ` stderr `  arguments passed to the callback will contain the
230+ stdout and stderr output of the child process. By default, Node.js will decode
231+ the output as UTF-8 and pass strings to the callback. The ` encoding `  option
232+ can be used to specify the character encoding used to decode the stdout and
233+ stderr output. If ` encoding `  is ` 'buffer' ` , ` Buffer `  objects will be passed to
234+ the callback instead.
235+ 
222236### child_process.fork(modulePath[ , args] [ , options ] )  
223237
224238*  ` modulePath `  {String} The module to run in the child
0 commit comments