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

        return $this->processRunner->join($this->handle);
    }
public function join(): Promise
    {
        if (!$this->handle) {
            throw new StatusError("Process has not been started.");
        }

        return $this->processRunner->join($this->handle);
    }
public function join ( ) : Promise { if ( ! $ this -> handle ) { throw new StatusError ( "Process has not been started." ) ; } return $ this -> processRunner -> join ( $ this -> handle ) ; }
Wait for the process to end.

@return Promise <int> Succeeds with process exit code or fails with a ProcessException if the process is killed.

@throws StatusError If the process has already been started.
Wait for the process to end .