[Process] Fixed a problem on RHEL5 where the exit code was incorrect
RHEL5 will intermittently result in an exit code of -1 [1] due to proc_get_status() being called after the process has completed but outside of updateStatus() which saves the exit code. [1]: https://github.com/composer/composer/issues/876
This commit is contained in:
parent
cb82287416
commit
310c458936
@ -290,7 +290,7 @@ class Process
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->processInformation = proc_get_status($this->process);
|
$this->updateStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -308,7 +308,7 @@ class Process
|
|||||||
*/
|
*/
|
||||||
public function wait($callback = null)
|
public function wait($callback = null)
|
||||||
{
|
{
|
||||||
$this->processInformation = proc_get_status($this->process);
|
$this->updateStatus();
|
||||||
$callback = $this->buildCallback($callback);
|
$callback = $this->buildCallback($callback);
|
||||||
while ($this->pipes || (defined('PHP_WINDOWS_VERSION_BUILD') && $this->fileHandles)) {
|
while ($this->pipes || (defined('PHP_WINDOWS_VERSION_BUILD') && $this->fileHandles)) {
|
||||||
if (defined('PHP_WINDOWS_VERSION_BUILD') && $this->fileHandles) {
|
if (defined('PHP_WINDOWS_VERSION_BUILD') && $this->fileHandles) {
|
||||||
|
Reference in New Issue
Block a user