Symfony\Component\Process\Process::getExitCode PHP Method

getExitCode() public method

Returns the exit code returned by the process.
public getExitCode ( ) : null | integer
return null | integer The exit status code, null if the Process is not terminated
    public function getExitCode()
    {
        if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
            throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.');
        }
        $this->updateStatus(false);
        return $this->exitcode;
    }

Usage Example

Ejemplo n.º 1
1
 /**
  * {@inheritdoc}
  */
 public function check()
 {
     if (!$this->isSuccessful()) {
         // on some systems stderr is used, but on others, it's not
         throw new LintingException($this->process->getErrorOutput() ?: $this->process->getOutput(), $this->process->getExitCode());
     }
 }
All Usage Examples Of Symfony\Component\Process\Process::getExitCode