@@ -214,10 +214,11 @@ Unlike the exec(3) POSIX system call, `child_process.exec()` does not replace
214
214
the existing process and uses a shell to execute the command.
215
215
216
216
If this method is invoked as its [ ` util.promisify() ` ] [ ] ed version, it returns
217
- a ` Promise ` for an ` Object ` with ` stdout ` and ` stderr ` properties. In case of an
218
- error (including any error resulting in an exit code other than 0), a rejected
219
- promise is returned, with the same ` error ` object given in the callback, but
220
- with an additional two properties ` stdout ` and ` stderr ` .
217
+ a ` Promise ` for an ` Object ` with ` stdout ` and ` stderr ` properties. The returned
218
+ ` ChildProcess ` instance is attached to the ` Promise ` as a ` child ` property. In
219
+ case of an error (including any error resulting in an exit code other than 0), a
220
+ rejected promise is returned, with the same ` error ` object given in the
221
+ callback, but with an additional two properties ` stdout ` and ` stderr ` .
221
222
222
223
``` js
223
224
const util = require (' util' );
@@ -295,9 +296,10 @@ stderr output. If `encoding` is `'buffer'`, or an unrecognized character
295
296
encoding, ` Buffer ` objects will be passed to the callback instead.
296
297
297
298
If this method is invoked as its [ ` util.promisify() ` ] [ ] ed version, it returns
298
- a ` Promise ` for an ` Object ` with ` stdout ` and ` stderr ` properties. In case of an
299
- error (including any error resulting in an exit code other than 0), a rejected
300
- promise is returned, with the same ` error ` object given in the
299
+ a ` Promise ` for an ` Object ` with ` stdout ` and ` stderr ` properties. The returned
300
+ ` ChildProcess ` instance is attached to the ` Promise ` as a ` child ` property. In
301
+ case of an error (including any error resulting in an exit code other than 0), a
302
+ rejected promise is returned, with the same ` error ` object given in the
301
303
callback, but with an additional two properties ` stdout ` and ` stderr ` .
302
304
303
305
``` js
0 commit comments