MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / setupSignalsTrap

Function setupSignalsTrap

lib/utilities/will-interrupt-process.js:129–137  ·  view source on GitHub ↗

* Sets up listeners for interruption signals * * When one of these signals is caught than raise process.exit() * which enforces `capture-exit` to run registered interruption handlers * * @method setupSignalsTrap

()

Source from the content-addressed store, hash-verified

127 * @method setupSignalsTrap
128 */
129function setupSignalsTrap() {
130 _process.on('SIGINT', exit);
131 _process.on('SIGTERM', exit);
132 _process.on('message', onMessage);
133
134 if (isWindowsTTY(_process)) {
135 trapWindowsSignals(_process);
136 }
137}
138
139/**
140 * Removes interruption signal listeners and tears down capture-exit

Callers 1

addHandlerFunction · 0.85

Calls 3

isWindowsTTYFunction · 0.85
trapWindowsSignalsFunction · 0.85
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…