src/node/wrapper.ts/ParentProcess/_start
class ParentProcess:  private async _start(): Promise<void> {
    const child = this.spawn()
    this.child = child

    // Log child output to stdout/stderr and to the log directory.
    if (child.stdout) {
      child.stdout.on("data", (data) => {
        this.logStdoutStream.write(data)
        process.stdout.write(data)
      })
    }
    if (child.stderr) {
      child.stderr.on("data", (data) => {
        this.logStderrStream.write(data)
        process.stderr.write(data)
      })
    }

    this.logger.debug(`spawned child process ${child.pid}`)

    await this.handshake(child)

    child.once("exit", (code) => {
      this.logger.debug(`inner process ${child.pid} exited unexpectedly`)
      this.exit(code || 0)
    })
  }