Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ac17617

Browse filesBrowse files
[Process] Fix double-fread() when reading unix pipes
1 parent 45dac4b commit ac17617
Copy full SHA for ac17617

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Process/Pipes/UnixPipes.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Pipes/UnixPipes.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function readAndWrite($blocking, $close = false)
120120
do {
121121
$data = fread($pipe, self::CHUNK_SIZE);
122122
$read[$type] .= $data;
123-
} while (isset($data[0]));
123+
} while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1])));
124124

125125
if (!isset($read[$type][0])) {
126126
unset($read[$type]);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.