Fixed problems with running processes returns wrong exitcode (-1) on Linux.
This commit is contained in:
parent
e718a51b59
commit
95ca258a42
@ -174,13 +174,13 @@ class Process
|
||||
$this->status = proc_get_status($process);
|
||||
}
|
||||
|
||||
proc_close($process);
|
||||
$exitCode = proc_close($process);
|
||||
|
||||
if ($this->status['signaled']) {
|
||||
throw new \RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->status['stopsig']));
|
||||
}
|
||||
|
||||
return $this->exitcode = $this->status['exitcode'];
|
||||
|
||||
return $this->exitcode = ($this->status["running"] ? $exitCode : $this->status["exitcode"]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user