Sha256: 12044052d2037fbb19637c6fb216b1c80c28664134453b9a0fc32fa2fe352c27

Contents?: true

Size: 1.4 KB

Versions: 64

Compression:

Stored size: 1.4 KB

Contents

/**
 * This is not the set of all possible signals.
 *
 * It IS, however, the set of all signals that trigger
 * an exit on either Linux or BSD systems.  Linux is a
 * superset of the signal names supported on BSD, and
 * the unknown signals just fail to register, so we can
 * catch that easily enough.
 *
 * Windows signals are a different set, since there are
 * signals that terminate Windows processes, but don't
 * terminate (or don't even exist) on Posix systems.
 *
 * Don't bother with SIGKILL.  It's uncatchable, which
 * means that we can't fire any callbacks anyway.
 *
 * If a user does happen to register a handler on a non-
 * fatal signal like SIGWINCH or something, and then
 * exit, it'll end up firing `process.emit('exit')`, so
 * the handler will be fired anyway.
 *
 * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
 * artificially, inherently leave the process in a
 * state from which it is not safe to try and enter JS
 * listeners.
 */
export const signals = [];
signals.push('SIGHUP', 'SIGINT', 'SIGTERM');
if (process.platform !== 'win32') {
    signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT'
    // should detect profiler and enable/disable accordingly.
    // see #21
    // 'SIGPROF'
    );
}
if (process.platform === 'linux') {
    signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT');
}
//# sourceMappingURL=signals.js.map

Version data entries

64 entries across 52 versions & 3 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js
immosquare-cleaner-0.1.51 node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
immosquare-cleaner-0.1.50 node_modules/signal-exit/dist/mjs/signals.js
immosquare-cleaner-0.1.50 node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
immosquare-cleaner-0.1.49 node_modules/signal-exit/dist/mjs/signals.js
immosquare-cleaner-0.1.49 node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/signal-exit/dist/mjs/signals.js
immosquare-cleaner-0.1.48 node_modules/signal-exit/dist/mjs/signals.js