Subject: Re: EISDIR on directory read(2)
To: None <firstname.lastname@example.org>
From: Greywolf <email@example.com>
Date: 10/10/1999 23:38:23
I'd like to go down on the record as disagreeing with returning
EISDIR on directory read(2) on several counts:
1. A directory -- locally -- is a file with special properties,
as has previously been noted. Remotely, it's up to the server
to decide how to handle a remote open on a directory. Locally,
opendir(3) and readdir(3) are just magic wrappers around open(2)
and read(2). To me, as a programmer, this makes perfect sense.
getdents(2) *almost* strikes me as more of a hack than opendir(3)
and readdir(3). Almost.
2. If you're going to return EISDIR, wouldn't you be doing that on the
open(2), not the read(2)?
3. "If it ain't broke, don't fix it."
NetBSD: The choice of hundr^Wtbousands worldwide.