You are here

public function Process::getExitCode in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/process/Process.php \Symfony\Component\Process\Process::getExitCode()

Returns the exit code returned by the process.

Return value

null|int The exit status code, null if the Process is not terminated

Throws

RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled

2 calls to Process::getExitCode()
Process::getExitCodeText in vendor/symfony/process/Process.php
Returns a string representation for the exit code returned by the process.
Process::isSuccessful in vendor/symfony/process/Process.php
Checks if the process ended successfully.

File

vendor/symfony/process/Process.php, line 585

Class

Process
Process is a thin wrapper around proc_* functions to easily start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function getExitCode() {
  if ($this
    ->isSigchildEnabled() && !$this->enhanceSigchildCompatibility) {
    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;
}