Changeset View
Changeset View
Standalone View
Standalone View
src/utils/utils.php
| Show First 20 Lines • Show All 1,059 Lines • ▼ Show 20 Lines | if ($result !== 0) { | ||||
| return $result; | return $result; | ||||
| } | } | ||||
| // If we make it here, we performed a 0-length write. Try to distinguish | // If we make it here, we performed a 0-length write. Try to distinguish | ||||
| // between EAGAIN and EPIPE. To do this, we're going to `stream_select()` | // between EAGAIN and EPIPE. To do this, we're going to `stream_select()` | ||||
| // the stream, write to it again if PHP claims that it's writable, and | // the stream, write to it again if PHP claims that it's writable, and | ||||
| // consider the pipe broken if the write fails. | // consider the pipe broken if the write fails. | ||||
| // (Signals received signals during the "fwrite()" do not appear to affect | // (Signals received during the "fwrite()" do not appear to affect anything, | ||||
| // anything, see D20083.) | // see D20083.) | ||||
| $read = array(); | $read = array(); | ||||
| $write = array($stream); | $write = array($stream); | ||||
| $except = array(); | $except = array(); | ||||
| $result = @stream_select($read, $write, $except, 0); | $result = @stream_select($read, $write, $except, 0); | ||||
| if ($result === false) { | if ($result === false) { | ||||
| // See T13243. If the select is interrupted by a signal, it may return | // See T13243. If the select is interrupted by a signal, it may return | ||||
| ▲ Show 20 Lines • Show All 843 Lines • Show Last 20 Lines | |||||