Browse files

doc: note that listening on SIGSEGV & co is unsafe

Note that trying to listen for some signals using `process.on()`
is unsafe in the `process` docs.

PR-URL: #8410
Reviewed-By: Ben Noordhuis <>
Reviewed-By: Colin Ihrig <>
Reviewed-By: James M Snell <>
  • Loading branch information...
addaleax authored and Fishrock123 committed Sep 5, 2016
1 parent 0d24247 commit 3ce6eaa3b95bde984631e9d4eef40eb2a669d34d
Showing with 5 additions and 0 deletions.
  1. +5 −0 doc/api/
@@ -422,6 +422,11 @@ It is important to take note of the following:
* `SIGKILL` cannot have a listener installed, it will unconditionally terminate
Node.js on all platforms.
* `SIGSTOP` cannot have a listener installed.
* `SIGBUS`, `SIGFPE`, `SIGSEGV` and `SIGILL`, when not raised artificially
using kill(2), inherently leave the process in a state from which it is not
safe to attempt to call JS listeners. Doing so might lead to the process
hanging in an endless loop, since listeners attached using `process.on()` are
called asynchronously and therefore unable to correct the underlying problem.
*Note*: Windows does not support sending signals, but Node.js offers some
emulation with [`process.kill()`][], and [`ChildProcess.kill()`][]. Sending

0 comments on commit 3ce6eaa

Please sign in to comment.