You are here

public function Process::getExitCodeText in Zircon Profile 8

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

Returns a string representation for the exit code returned by the process.

This method relies on the Unix exit code status standardization and might not be relevant for other operating systems.

Return value

null|string A string representation for 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

See also

http://tldp.org/LDP/abs/html/exitcodes.html

http://en.wikipedia.org/wiki/Unix_signal

File

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

Class

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

Namespace

Symfony\Component\Process

Code

public function getExitCodeText() {
  if (null === ($exitcode = $this
    ->getExitCode())) {
    return;
  }
  return isset(self::$exitCodes[$exitcode]) ? self::$exitCodes[$exitcode] : 'Unknown error';
}