src/node/wrapper.ts/ParentProcess/disposeChild
class ParentProcess:  private async disposeChild(): Promise<void> {
    this.started = undefined
    if (this.child) {
      const child = this.child
      child.removeAllListeners()
      child.kill()
      // Wait for the child to exit otherwise its output will be lost which can
      // be especially problematic if you're trying to debug why cleanup failed.
      await new Promise((r) => child!.on("exit", r))
    }
  }