[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Use consistent errno for read(2) failure on directories
On Sat, Dec 10, 2011 at 12:06:18PM -0500, Mouse wrote:
> >> According to the online OpenGroup specification for read(2)
> >> available at , read(2) on directories is implementation
> >> dependant. If unsupported, it shall fail with EISDIR.
> >> Not all our file systems comply, and return random errno values in
> >> this case (mostly EINVAL or ENOTSUP).
> How does that not comply with "implementation dependent"? From a
> standards-conformance point of view, that's equivalent to "in this
> implementation, read(2) on directories is supported: on $FILESYSTEM, it
> always returns EINVAL, on $OTHER_FILESYSTEM, it works according to
> $REFERENCE; on $THIRD_FILESYSTEM, it always returns EOPNOTSUPP".
> This is not to say that it shouldn't be cleaned up. Just that I don't
> think it's actually nonconformant.
Actually, it's filesystem implementation dependant to allow read(2) on
directories; and if the implementation does not support it, it should
fail with EISDIR.
Projects and Developments in Bioinformatics
Institut Pasteur, Paris.
Main Index |
Thread Index |