merged branch cs278/rhel5-invalid-exitcode (PR #4970)
Commits
-------
310c458
[Process] Fixed a problem on RHEL5 where the exit code was incorrect
Discussion
----------
[Process] Fixed a problem on RHEL5 where the exit code was incorrect
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
RHEL5 will intermittently result in an exit code of -1 due to `proc_get_status()` being called after the process has completed but outside of `updateStatus()` which saves the exit code.
See composer/composer#876
This commit is contained in:
commit
d5463acb23
|
@ -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)
|
||||
{
|
||||
$this->processInformation = proc_get_status($this->process);
|
||||
$this->updateStatus();
|
||||
$callback = $this->buildCallback($callback);
|
||||
while ($this->pipes || (defined('PHP_WINDOWS_VERSION_BUILD') && $this->fileHandles)) {
|
||||
if (defined('PHP_WINDOWS_VERSION_BUILD') && $this->fileHandles) {
|
||||
|
|
Reference in New Issue