src/node/wrapper.ts/Process/constructor
class Process:  public constructor() {
    process.on("SIGINT", () => this._onDispose.emit("SIGINT"))
    process.on("SIGTERM", () => this._onDispose.emit("SIGTERM"))
    process.on("exit", () => this._onDispose.emit(undefined))

    this.onDispose((signal, wait) => {
      // Remove listeners to avoid possibly triggering disposal again.
      process.removeAllListeners()

      // Try waiting for other handlers to run first then exit.
      this.logger.debug("disposing", field("code", signal))
      wait.then(() => this.exit(0))
      setTimeout(() => this.exit(0), 5000)
    })
  }