https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246412
Bug ID: 246412
Summary: Return EISDIR when reading a directory
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
FreeBSD have shipped with readdir() and allowing read() on directories is not
very useful.
Other POSIX compliant operating systems like macOS returns EISDIR when
read()ing a directory too, it is allowed in the specification:
Quote https://pubs.opengroup.org/onlinepubs/009695399/functions/read.html :
EISDIR
[XSI] The fildes argument refers to a directory and the implementation does not
allow the directory to be read using read() or pread(). The readdir() function
should be used instead.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"