diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2009-01-09 17:21:12 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2009-01-09 17:21:12 +0000 |
commit | 71ea95354b4133f12dcf8207bc7b36e1562bdd65 (patch) | |
tree | d086c5d9579dfef4baeaceb7519080dbdf086ab1 /Zend/zend_stream.c | |
parent | 2538bd21e7086941dea30e59ac3927654ea2d9db (diff) | |
download | php-git-71ea95354b4133f12dcf8207bc7b36e1562bdd65.tar.gz |
MFH: Corrected fix for bug #46844 to only trigger on the 1st line of CLI
opened files.
Diffstat (limited to 'Zend/zend_stream.c')
-rw-r--r-- | Zend/zend_stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index 6e5f3f3836..10183d664b 100644 --- a/Zend/zend_stream.c +++ b/Zend/zend_stream.c @@ -214,7 +214,7 @@ ZEND_API int zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t #if HAVE_MMAP if (file_handle->handle.fp) { /* *buf[size] is zeroed automatically by the kernel */ - *buf = mmap(0, size + ZEND_MMAP_AHEAD, PROT_READ, MAP_PRIVATE, fileno(file_handle->handle.fp), 0); + *buf = mmap(0, size + ZEND_MMAP_AHEAD, PROT_READ, MAP_PRIVATE, fileno(file_handle->handle.fp), ftell(file_handle->handle.fp)); if (*buf != MAP_FAILED) { file_handle->handle.stream.mmap.len = size; file_handle->handle.stream.mmap.map = *buf; |