Date: Tue, 12 May 2020 02:46:25 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 246412] Return EISDIR when reading a directory Message-ID: <bug-246412-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246412 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: bugs@FreeBSD.org Reporter: delphij@FreeBSD.org FreeBSD have shipped with readdir() and allowing read() on directories is n= ot 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() funct= ion should be used instead. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246412-227>