Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: clarify windows specific behaviour #32079

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,17 @@ process.on('SIGTERM', handle);
the process hanging in an endless loop, since listeners attached using
`process.on()` are called asynchronously and therefore unable to correct the
underlying problem.

Windows does not support sending signals, but Node.js offers some emulation
with [`process.kill()`][], and [`subprocess.kill()`][]. Sending signal `0` can
be used to test for the existence of a process. Sending `SIGINT`, `SIGTERM`,
and `SIGKILL` cause the unconditional termination of the target process.
* `0` can be sent to test for the existence of a process, it has no effect if
the process exists, but will throw an error if the process does not exist.

Windows does not support signals so has no equivalent to termination by signal,
but Node.js offers some emulation with [`process.kill()`][], and
[`subprocess.kill()`][]:
* Sending `SIGINT`, `SIGTERM`, and `SIGKILL` will cause the unconditional
termination of the target process, and afterwards, subprocess will report that
the process was terminated by signal.
* Sending signal `0` can be used as a platform independent way to test for the
existence of a process.

## `process.abort()`
<!-- YAML
Expand Down