src/Services/Process.php
public function getExitCode()
    {
        if ($this->exitcode === null && $this->process !== null) {
            $status = proc_get_status($this->process);
            if ($status && $status['running'] === false) {
                $this->exitcode = $status['exitcode'];
            }
        }

        return $this->exitcode;
    }
public function getExitCode()
    {
        if ($this->exitcode === null && $this->process !== null) {
            $status = proc_get_status($this->process);
            if ($status && $status['running'] === false) {
                $this->exitcode = $status['exitcode'];
            }
        }

        return $this->exitcode;
    }
public function getExitCode ( ) { if ( $ this -> exitcode === null && $ this -> process !== null ) { $ status = proc_get_status ( $ this -> process ) ; if ( $ status && $ status [ 'running' ] === false ) { $ this -> exitcode = $ status [ 'exitcode' ] ; } } return $ this -> exitcode ; }
Get the exit code returned by the process.

@return null|int The exit status code, null if the Process is not terminated.
Get the exit code returned by the process .