src/node/wrapper.ts/ChildProcess/constructor
class ChildProcess:  public constructor(private readonly parentPid: number) {
    super()

    // Kill the inner process if the parent dies. This is for the case where the
    // parent process is forcefully terminated and cannot clean up.
    setInterval(() => {
      try {
        // process.kill throws an exception if the process doesn't exist.
        process.kill(this.parentPid, 0)
      } catch (_) {
        // Consider this an error since it should have been able to clean up
        // the child process unless it was forcefully killed.
        this.logger.error(`parent process ${parentPid} died`)
        this._onDispose.emit(undefined)
      }
    }, 5000)
  }