Skip to content

Commit 13c3924

Browse files
joaolucaslMylesBorins
authored andcommittedApr 4, 2021
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 <soyjuanarbol@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 570fbce commit 13c3924

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
@@ -1277,6 +1277,11 @@ may not actually terminate the process.
12771277

12781278
See kill(2) for reference.
12791279

1280+
On Windows, where POSIX signals do not exist, the `signal` argument will be
1281+
ignored, and the process will be killed forcefully and abruptly (similar to
1282+
`'SIGKILL'`).
1283+
See [Signal Events][] for more details.
1284+
12801285
On Linux, child processes of child processes will not be terminated
12811286
when attempting to kill their parent. This is likely to happen when running a
12821287
new process in a shell or with the use of the `shell` option of `ChildProcess`:
@@ -1741,6 +1746,7 @@ or [`child_process.fork()`][].
17411746
[Default Windows shell]: #child_process_default_windows_shell
17421747
[HTML structured clone algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
17431748
[Shell requirements]: #child_process_shell_requirements
1749+
[Signal Events]: process.md#process_signal_events
17441750
[`'disconnect'`]: process.md#process_event_disconnect
17451751
[`'error'`]: #child_process_event_error
17461752
[`'exit'`]: #child_process_event_exit

0 commit comments

Comments
 (0)
Please sign in to comment.