Re: PHP 4.0 Bug #9933 Updated: readdir doesn't work see Bug ID # 9058
| From: | Sascha Schumann | Date: | Fri, 27 Apr 2001 11:13:08 +0000 |
| Subject: | Re: PHP 4.0 Bug #9933 Updated: readdir doesn't work see Bug ID # 9058 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-52575@lists.php.net to get a copy of this message | ||
> So what does that mean? The code is OK there and it isn't reached on
> systems where readdir_r returns 0 for success? I'm not quite sure what to
> do with this bug report.
We either need to differentiate between Solaris and HPUX
readdir_r or ignore the return value of that system call, as
the semantics differ. Solaris return non-zero on success
whereas HPUX returns zero.
This could be achieved by setting entry->d_name[0] to NUL
before the system call and assume that it failed, if the
system call does not change the contents of d_name.
- Sascha Experience IRCG
http://schumann.cx/ http://schumann.cx/ircg