let exitFn = null;
function registerExitHandler(fn) {
  exitFn = fn;
}
function triggerExit() {
  if (exitFn) {
    exitFn();
  } else {
    process.exit(0);
  }
}
export {
  registerExitHandler,
  triggerExit
};
