★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/83c2a14e08Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
doc: update spawnSync() status value possibilities
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 <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
Trott authored and BethGriggs committed Apr 17, 2019
1 parent 621099e commit 83c2a14e0822e98c091bfb13c01568520f8fce6e
Showing with 4 additions and 2 deletions.
  1. +4 −2 doc/api/child_process.md
@@ -860,8 +860,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

0 comments on commit 83c2a14

Please sign in to comment.