diff options
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 3ed947e9f..f280885e0 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: plain_wrapper.c,v 1.52.2.6.2.21 2007/04/18 14:23:06 dmitry Exp $ */ +/* $Id: plain_wrapper.c,v 1.52.2.6.2.23 2007/07/25 16:34:05 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -329,9 +329,6 @@ static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count TSRMLS assert(data != NULL); if (data->fd >= 0) { - if (stream->eof && !data->is_pipe) { - return 0; - } ret = read(data->fd, buf, count); if (ret == (size_t)-1 && errno == EINTR) { @@ -341,7 +338,7 @@ static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count TSRMLS ret = read(data->fd, buf, count); } - stream->eof = (ret == 0 || (ret == (size_t)-1 && errno != EWOULDBLOCK && errno != EINTR)); + stream->eof = (ret == 0 || (ret == (size_t)-1 && errno != EWOULDBLOCK && errno != EINTR && errno != EBADF)); } else { #if HAVE_FLUSHIO |