Bug#454545: readdir_r documentation does not describe observed behavior
Package: glibc-doc-reference
Version: 2.7-1
Severity: normal
The readdir_r documentation states that:
Normally `readdir_r' returns zero and sets `*RESULT' to ENTRY. If
there are no more entries in the directory or an error is
detected, `readdir_r' sets `*RESULT' to a null pointer and returns
a nonzero error code, also stored in `errno', as described for
`readdir'.
However, I seem to get a 0 return value from readdir_r even at the end
of the directory; I have to check the value of *RESULT to see whether
I'm at the end.
Daniel
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/bash
-- no debconf information
Reply to: