| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2248ba7 commit fa78aa4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -518,11 +518,17 @@ process.on('SIGTERM', handle); | |||
| 518 | 518 | the process hanging in an endless loop, since listeners attached using | |
| 519 | 519 | `process.on()` are called asynchronously and therefore unable to correct the | |
| 520 | 520 | underlying problem. | |
| 521 | - | ||
| 522 | - Windows does not support sending signals, but Node.js offers some emulation | ||
| 523 | - with [`process.kill()`][], and [`subprocess.kill()`][]. Sending signal `0` can | ||
| 524 | - be used to test for the existence of a process. Sending `SIGINT`, `SIGTERM`, | ||
| 525 | - and `SIGKILL` cause the unconditional termination of the target process. | ||
| 521 | + * `0` can be sent to test for the existence of a process, it has no effect if | ||
| 522 | + the process exists, but will throw an error if the process does not exist. | ||
| 523 | + | ||
| 524 | + Windows does not support signals so has no equivalent to termination by signal, | ||
| 525 | + but Node.js offers some emulation with [`process.kill()`][], and | ||
| 526 | + [`subprocess.kill()`][]: | ||
| 527 | + * Sending `SIGINT`, `SIGTERM`, and `SIGKILL` will cause the unconditional | ||
| 528 | + termination of the target process, and afterwards, subprocess will report that | ||
| 529 | + the process was terminated by signal. | ||
| 530 | + * Sending signal `0` can be used as a platform independent way to test for the | ||
| 531 | + existence of a process. | ||
| 526 | 532 | ||
| 527 | 533 | ## `process.abort()` | |
| 528 | 534 | <!-- YAML | |
| Back | FazBrowse Home | New Git URL |
0 commit comments