Re: [PHP-DEV] Opinion needed (bug #45928)

2008-09-10 Thread Christian Schneider
Am 10.09.2008 um 10:52 schrieb Tullio Andreatta ML: fstat on a open-ed fd can't stat a symbolic link, since open(symlink) returns a file descriptor of the target file, or -1 if it's a dangling link ... Yes, that's right. So Arnaud's patch at http://arnaud.lb.s3.amazonaws.com/45928.patch

Re: [PHP-DEV] Opinion needed (bug #45928)

2008-09-10 Thread Arnaud Le Blanc
On Wednesday 10 September 2008 11:25:40 Christian Schneider wrote: Am 10.09.2008 um 10:52 schrieb Tullio Andreatta ML: fstat on a open-ed fd can't stat a symbolic link, since open(symlink) returns a file descriptor of the target file, or -1 if it's a dangling link ... Yes, that's

[PHP-DEV] Opinion needed (bug #45928)

2008-09-09 Thread Alexey Zakhlestin
http://bugs.php.net/bug.php?id=45928 Christian Schneider wrote: I had a quick look at this bug and found the problem to be in Zend/zend_stream.c function zend_stream_fsize(): It uses fstat() to determine the filesize which on MacOS X for pipes returns either 0 (my interpretation: no data

Re: [PHP-DEV] Opinion needed (bug #45928)

2008-09-09 Thread Arnaud Le Blanc
Hi, On Tuesday 09 September 2008 14:39:05 Alexey Zakhlestin wrote: http://bugs.php.net/bug.php?id=45928 Christian Schneider wrote: I had a quick look at this bug and found the problem to be in Zend/zend_stream.c function zend_stream_fsize(): It uses fstat() to determine the filesize

Re: [PHP-DEV] Opinion needed (bug #45928)

2008-09-09 Thread Christian Schneider
Arnaud Le Blanc wrote: The following may (no MacOS X to test) fix the problem by returning 0 from zend_stream_fsize() when the file descriptor is not a regular file: http://arnaud.lb.s3.amazonaws.com/45928.patch Your patch: +#ifdef S_ISREG + if (!S_ISREG(buf.st_mode)) { +

Re: [PHP-DEV] Opinion needed (bug #45928)

2008-09-09 Thread Arnaud Le Blanc
Hi, On Tuesday 09 September 2008 17:35:54 Christian Schneider wrote: Arnaud Le Blanc wrote: The following may (no MacOS X to test) fix the problem by returning 0 from zend_stream_fsize() when the file descriptor is not a regular file: http://arnaud.lb.s3.amazonaws.com/45928.patch Your