diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-07-25 16:34:06 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-07-25 16:34:06 +0000 |
commit | 2d3d745bd9aece8adb2d5c8cc013a60a6136fb8d (patch) | |
tree | a60896e71b27d44c23b9489d34f852eb28b49f78 /main/streams/plain_wrapper.c | |
parent | d0ef6e9a95bfd143324a7bffef99779725213e5b (diff) | |
download | php-git-2d3d745bd9aece8adb2d5c8cc013a60a6136fb8d.tar.gz |
Fixed EOF handling in case of reading from file opened in write only mode.
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 3073314992..74c1841950 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -338,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 |