Skip to content

Commit

Permalink
doc: add Windows-specific info to subprocess.kill()
Browse files Browse the repository at this point in the history
Clarify the inner workings of .kill on Windows,
since termination signals are not available there.

Fixes: #34858
  • Loading branch information
joaolucasl authored and Trott committed Jan 8, 2021
1 parent 15e47ed commit c0ba12a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/api/child_process.md
Expand Up @@ -1211,6 +1211,10 @@ may not actually terminate the process.

See kill(2) for reference.

On Windows, the child process is forcefully terminated because
`SIGKILL` and `SIGTERM` signals are not available.
See [Signal Events][] for more details.

On Linux, child processes of child processes will not be terminated
when attempting to kill their parent. This is likely to happen when running a
new process in a shell or with the use of the `shell` option of `ChildProcess`:
Expand Down Expand Up @@ -1673,6 +1677,7 @@ or [`child_process.fork()`][].
[Default Windows shell]: #child_process_default_windows_shell
[HTML structured clone algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
[Shell requirements]: #child_process_shell_requirements
[Signal Events]: process.md#process_signal_events
[`'disconnect'`]: process.md#process_event_disconnect
[`'error'`]: #child_process_event_error
[`'exit'`]: #child_process_event_exit
Expand Down

0 comments on commit c0ba12a

Please sign in to comment.