From 162e6444d3452610db7fede1e0e85fb14aecb67e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 15 Mar 2019 05:10:28 -0700 Subject: [PATCH 1/4] 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. --- doc/api/child_process.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index a6064ee3c7545f..9c7f53e52ddeee 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -868,7 +868,8 @@ 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. + * `status` {number|null} The exit code of the subprocess, or `null` if the + child process exited due to a signal. * `signal` {string} The signal used to kill the child process. * `error` {Error} The error object if the child process failed or timed out. From 28367bb966d81264ed6f799fc19eb17562a905db Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 17 Mar 2019 03:34:17 -0700 Subject: [PATCH 2/4] fixup! doc: update spawnSync() status value possibilities --- doc/api/child_process.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 9c7f53e52ddeee..8473309e024cd0 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -869,8 +869,9 @@ changes: * `stdout` {Buffer|string} The contents of `output[1]`. * `stderr` {Buffer|string} The contents of `output[2]`. * `status` {number|null} The exit code of the subprocess, or `null` if the - child process exited due to a signal. - * `signal` {string} The signal used to kill the child process. + subprocess ended due to a signal. + * `signal` {string|null} The signal used to kill the subprocess, or `null` if + the subprocess did not end 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 From 321fff3eedb6c1fa04d6b88f31e52ab05462b283 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 18 Mar 2019 10:43:29 -0700 Subject: [PATCH 3/4] fixup! fixup! doc: update spawnSync() status value possibilities --- doc/api/child_process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 8473309e024cd0..f1ac20a39980d5 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -869,7 +869,7 @@ changes: * `stdout` {Buffer|string} The contents of `output[1]`. * `stderr` {Buffer|string} The contents of `output[2]`. * `status` {number|null} The exit code of the subprocess, or `null` if the - subprocess ended due to a signal. + subprocess terminated due to a signal. * `signal` {string|null} The signal used to kill the subprocess, or `null` if the subprocess did not end due to a signal. * `error` {Error} The error object if the child process failed or timed out. From a81bd25f928e562f986cd27c49170d6a05048d1b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 18 Mar 2019 10:45:41 -0700 Subject: [PATCH 4/4] fixup! fixup! fixup! doc: update spawnSync() status value possibilities --- doc/api/child_process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index f1ac20a39980d5..a3bdfc15c385e7 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -871,7 +871,7 @@ changes: * `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 end due to a signal. + 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