1 // This is not the set of all possible signals.
3 // It IS, however, the set of all signals that trigger
4 // an exit on either Linux or BSD systems. Linux is a
5 // superset of the signal names supported on BSD, and
6 // the unknown signals just fail to register, so we can
7 // catch that easily enough.
9 // Don't bother with SIGKILL. It's uncatchable, which
10 // means that we can't fire any callbacks anyway.
12 // If a user does happen to register a handler on a non-
13 // fatal signal like SIGWINCH or something, and then
14 // exit, it'll end up firing `process.emit('exit')`, so
15 // the handler will be fired anyway.
17 // SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
18 // artificially, inherently leave the process in a
19 // state from which it is not safe to try and enter JS
29 if (process.platform !== 'win32') {
39 // should detect profiler and enable/disable accordingly.
45 if (process.platform === 'linux') {