Defect report from : Paul Eggert , UCLA
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 1197 line 37475 section readdir objection {20060605a}
Problem:
Edition of Specification (Year): 2004
Defect code : 2. Omission
With the XSI option, readdir and readdir_r are required to return a
structure containing a file serial number, but the specification does
not say which file serial number must be returned. In theory, a
conforming implementation could return a random number in this slot.
In practice, there are issues involving symbolic links, mount points,
and so forth, that ought to be nailed down, if only to say that the
behavior is unspecified. In particular, there is a common bug at a
mount point, where readdir returns the inode number of the underlying
file instead of the root directory of the mounted file system.
Action:
After XSI page 1197 line 37475, append the following sentence with XSI
highlighting:
The value of the structure's d_ino member shall be the file serial
number of the corresponding file, except that the value is
unspecified for symbolic links.
After XSI page 1199 line 37575 insert this paragraph:
When returning a directory entry for the root of a mounted file
system, some historical implementations of readdir() return the
file serial number of the underlying mount point, rather than of
the root of the mounted file system. This behavior is considered
to be a bug, since the underlying file serial number has no
significance to applications.
|