Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNitzan Uziely <nitzan@testim.io>2021-02-11 21:59:00 +0300
committerMichaƫl Zasso <targos@protonmail.com>2021-02-28 16:46:24 +0300
commitddae11213302254792758cea21f6e73ae0848552 (patch)
treefd5cf9eaedf522ee6b1ac781b42d881b2d004afc /doc
parent3b7cb75554dcbdc595a73dcdde1cc2f06840eba6 (diff)
child_process: fix spawn and fork abort behavior
Fix AbortSignal in Spawn which doesn't actually abort the process, and fork can emit an AbortError even if the process was already exited. Add documentation For killSignal. Fixes: https://github.com/nodejs/node/issues/37273 PR-URL: https://github.com/nodejs/node/pull/37325 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/child_process.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index ee8f0b4f0bc..b7fce216282 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -351,6 +351,9 @@ controller.abort();
<!-- YAML
added: v0.5.0
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/37325
+ description: killSignal for AbortSignal was added.
- version: v15.6.0
pr-url: https://github.com/nodejs/node/pull/36603
description: AbortSignal support was added.
@@ -383,6 +386,8 @@ changes:
messages between processes. Possible values are `'json'` and `'advanced'`.
See [Advanced serialization][] for more details. **Default:** `'json'`.
* `signal` {AbortSignal} Allows closing the subprocess using an AbortSignal.
+ * `killSignal` {string} The signal value to be used when the spawned
+ process will be killed by the abort signal. **Default:** `'SIGTERM'`.
* `silent` {boolean} If `true`, stdin, stdout, and stderr of the child will be
piped to the parent, otherwise they will be inherited from the parent, see
the `'pipe'` and `'inherit'` options for [`child_process.spawn()`][]'s
@@ -431,6 +436,9 @@ The `signal` option works exactly the same way it does in
<!-- YAML
added: v0.1.90
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/37325
+ description: killSignal for AbortSignal was added.
- version: v15.5.0
pr-url: https://github.com/nodejs/node/pull/36432
description: AbortSignal support was added.
@@ -477,6 +485,8 @@ changes:
* `windowsHide` {boolean} Hide the subprocess console window that would
normally be created on Windows systems. **Default:** `false`.
* `signal` {AbortSignal} allows aborting the execFile using an AbortSignal.
+ * `killSignal` {string} The signal value to be used when the spawned
+ process will be killed by the abort signal. **Default:** `'SIGTERM'`.
* Returns: {ChildProcess}