Bug #9933 Updated: readdir doesn't work see Bug ID # 9058
| From: | jmoore@php.net | Date: | Sun, 29 Apr 2001 10:17:52 +0000 |
| Subject: | Bug #9933 Updated: readdir doesn't work see Bug ID # 9058 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52870@lists.php.net to get a copy of this message | ||
ID: 9933
Updated by: jmoore
Reported By: Larry.Schartman@uc.edu
Old-Status: Open
Status: Closed
Bug Type: Directory function related
PHP Version: 4.0.4pl1
Assigned To:
Comments:
This should be fixed in CVS please reopen if the problem persists
- james
Previous Comments:
---------------------------------------------------------------------------
[2001-04-27 02:23:32] Larry.Schartman@uc.edu
Hi,
i think this is the problem (reentrancy.c)
int ret;
errno = 0;
ret = readdir_r(dirp, entry);
if (!ret || errno != 0) {
^^^^
*result = NULL;
} else {
*result = entry;
}
return errno;
thr return value of readdir_r is 0 on success, so the above
will return NULL on success. The line should be something like
if (ret != 0 || errno != 0) {
Thomas
---------------------------------------------------------------------------
[2001-03-22 11:59:49] Larry.Schartman@uc.edu
Greetings,
I have unknowlingly followed the same path that Brian has in bug report # 9058. Namely, HP-UX
10.20, gcc version 2.95, PHP compiled many different ways but latley -
./configure --enable-libgcc --with-apxs=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql --disable-posix
My application seems to work OK with the execption of no files listed from a readdir call. The
example code from readdir returns -
Directory handle: Resource id #1 Files:
and no file names.
Please let me know if there is anything I can do.
larry
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9933&edit=2