lib/Process.php
public function start(): Promise
    {
        if ($this->handle) {
            throw new StatusError("Process has already been started.");
        }

        return call(function () {
            $this->handle = $this->processRunner->start($this->command, $this->cwd, $this->env, $this->options);
            return $this->pid = yield $this->handle->pidDeferred->promise();
        });
    }
public function start(): Promise
    {
        if ($this->handle) {
            throw new StatusError("Process has already been started.");
        }

        return call(function () {
            $this->handle = $this->processRunner->start($this->command, $this->cwd, $this->env, $this->options);
            return $this->pid = yield $this->handle->pidDeferred->promise();
        });
    }
Start the process.

@return Promise<int> Resolves with the PID.

@throws StatusError If the process has already been started.