diff --git a/src/Command.php b/src/Command.php index 0e09bc5..5432c5a 100644 --- a/src/Command.php +++ b/src/Command.php @@ -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]);