"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.onExitProcess = void 0;
function onExitProcess(listener) {
    process.on('exit', listener);
    // listen to 'SIGINT' and trigger a exit
    // 'SIGINT' from the terminal is supported on all platforms, and can usually be generated with Ctrl + C
    process.on('SIGINT', () => {
        // eslint-disable-next-line no-process-exit
        process.exit(0);
    });
}
exports.onExitProcess = onExitProcess;
