Skip to content

Commit

Permalink
[Process] Fixed a problem on RHEL5 where the exit code was incorrect
Browse files Browse the repository at this point in the history
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]: composer/composer#876
  • Loading branch information
cs278 committed Jul 18, 2012
1 parent cb82287 commit 310c458
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function start($callback = null)
}
}

$this->processInformation = proc_get_status($this->process);
$this->updateStatus();
}

/**
Expand All @@ -308,7 +308,7 @@ public function start($callback = null)
*/
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) {
Expand Down

0 comments on commit 310c458

Please sign in to comment.