Skip to content

Commit

Permalink
Issue #20 Read stderr before stdout to avoid hanging processes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehaertl committed Jan 26, 2017
1 parent 99f9d7d commit a628505
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ public function execute()

if (is_resource($process)) {

$this->_stdOut = stream_get_contents($pipes[1]);
// Issue #20: Read stderr before stdout to avoid hanging processes
$this->_stdErr = stream_get_contents($pipes[2]);
$this->_stdOut = stream_get_contents($pipes[1]);
fclose($pipes[1]);
fclose($pipes[2]);

Expand Down

0 comments on commit a628505

Please sign in to comment.