From: Wez Furlong Date: Fri, 1 Nov 2002 04:58:23 +0000 (+0000) Subject: Probable fix for #20180. X-Git-Tag: php-4.3.0RC1~373 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae4c3c22e1795df33b819cb4b5bc35bd53f17b0e;p=php Probable fix for #20180. --- diff --git a/main/streams.c b/main/streams.c index c680cf3c31..990f676328 100755 --- a/main/streams.c +++ b/main/streams.c @@ -1286,7 +1286,7 @@ static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count TSRMLS if (data->fd >= 0) { ret = read(data->fd, buf, count); - if (ret == 0 || (ret < count && errno != EWOULDBLOCK)) + if (ret == 0 || (ret == -1 && errno != EWOULDBLOCK)) stream->eof = 1; } else {