Skip to content

Commit

Permalink
doc: update spawnSync() status value possibilities
Browse files Browse the repository at this point in the history
The object returned by `child_process.spawnSync()` can have the `status`
property set to `null` if the process terminated due to a signal. We
even test for this in
test/parallel/test-child-process-spawnsync-kill-signal.js.

Update the documentation to reflect this.

PR-URL: #26680
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • Loading branch information
Trott authored and targos committed Mar 27, 2019
1 parent 54ffe61 commit 0303aba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,10 @@ changes:
* `output` {Array} Array of results from stdio output.
* `stdout` {Buffer|string} The contents of `output[1]`.
* `stderr` {Buffer|string} The contents of `output[2]`.
* `status` {number} The exit code of the child process.
* `signal` {string} The signal used to kill the child process.
* `status` {number|null} The exit code of the subprocess, or `null` if the
subprocess terminated due to a signal.
* `signal` {string|null} The signal used to kill the subprocess, or `null` if
the subprocess did not terminate due to a signal.
* `error` {Error} The error object if the child process failed or timed out.

The `child_process.spawnSync()` method is generally identical to
Expand Down

0 comments on commit 0303aba

Please sign in to comment.