Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
removeHandler(cb) {
let index = handlers.indexOf(cb);
if (index < 0) {
return;
}
handlers.splice(index, 1);
captureExit.offExit(cb);
if (handlers.length === 0) {
teardownSignalsTrap();
}
},
};
_cleanupSignals() {
process.removeListener('SIGINT', this._boundOnSIGINT);
process.removeListener('SIGTERM', this._boundOnSIGTERM);
process.removeListener('message', this._boundOnMessage);
exit.offExit(this._boundCleanup);
if (/^win/.test(process.platform)) {
this._cleanupWindowsSignals();
}
}