"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/signal-exit/signals.js" (7 Feb 2017, 1166 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // This is not the set of all possible signals.
    2 //
    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.
    8 //
    9 // Don't bother with SIGKILL.  It's uncatchable, which
   10 // means that we can't fire any callbacks anyway.
   11 //
   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.
   16 module.exports = [
   17   'SIGABRT',
   18   'SIGALRM',
   19   'SIGBUS',
   20   'SIGFPE',
   21   'SIGHUP',
   22   'SIGILL',
   23   'SIGINT',
   24   'SIGSEGV',
   25   'SIGTERM'
   26 ]
   27 
   28 if (process.platform !== 'win32') {
   29   module.exports.push(
   30     'SIGVTALRM',
   31     'SIGXCPU',
   32     'SIGXFSZ',
   33     'SIGUSR2',
   34     'SIGTRAP',
   35     'SIGSYS',
   36     'SIGQUIT',
   37     'SIGIOT'
   38     // should detect profiler and enable/disable accordingly.
   39     // see #21
   40     // 'SIGPROF'
   41   )
   42 }
   43 
   44 if (process.platform === 'linux') {
   45   module.exports.push(
   46     'SIGIO',
   47     'SIGPOLL',
   48     'SIGPWR',
   49     'SIGSTKFLT',
   50     'SIGUNUSED'
   51   )
   52 }