Skip to content

Commit 35a382e

Browse files
joaolucasltargos
authored andcommitted
doc: add Windows-specific info to subprocess.kill()
Clarify the inner workings of .kill on Windows, since termination signals are not available there. Fixes: #34858 PR-URL: #34867 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 2e3305d commit 35a382e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/api/child_process.md

+6
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,11 @@ may not actually terminate the process.
12031203

12041204
See kill(2) for reference.
12051205

1206+
On Windows, where POSIX signals do not exist, the `signal` argument will be
1207+
ignored, and the process will be killed forcefully and abruptly (similar to
1208+
`'SIGKILL'`).
1209+
See [Signal Events][] for more details.
1210+
12061211
On Linux, child processes of child processes will not be terminated
12071212
when attempting to kill their parent. This is likely to happen when running a
12081213
new process in a shell or with the use of the `shell` option of `ChildProcess`:
@@ -1667,6 +1672,7 @@ or [`child_process.fork()`][].
16671672
[Default Windows shell]: #child_process_default_windows_shell
16681673
[HTML structured clone algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
16691674
[Shell requirements]: #child_process_shell_requirements
1675+
[Signal Events]: process.md#process_signal_events
16701676
[`'disconnect'`]: process.md#process_event_disconnect
16711677
[`'error'`]: #child_process_event_error
16721678
[`'exit'`]: #child_process_event_exit

0 commit comments

Comments
 (0)