[Process] Fix double-fread() when reading unix pipes

This commit is contained in:
Nicolas Grekas 2016-08-02 15:52:07 +02:00
parent 45dac4b44e
commit ac17617ac0
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ class UnixPipes extends AbstractPipes
do {
$data = fread($pipe, self::CHUNK_SIZE);
$read[$type] .= $data;
} while (isset($data[0]));
} while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1])));
if (!isset($read[$type][0])) {
unset($read[$type]);