home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: jazz@hal.com (Jason Zions)
-
- In article <20isj2INN32o@rodan.UU.NET> guy@auspex.com (Guy Harris) writes:
- >If 1003.8 refers to NFS at all, what will it say about the behavior of
- >file systems mounted from non-POSIX-compliant NFS servers? I suspect
- >it'll have to say "you're on your own there, bucko", in which case
- >suppliers of those servers are free to reject attempts to read from
- >directories with the NFS READ request (rather than the NFS READDIR
- >request).
-
- 1003.8 doesn't refer to particular mechanisms used to provide file access in
- the normative standard; the informative annexes talk about how some of the
- most common mechanisms appear to an application program when viewed through
- the eyes of pathconf() and the new set of pathconf() variables that 1003.8
- defines.
-
- 1003.8 doesn't care about how the file access mechanism is implemented; NFS
- implemented on Unix, FTAM implemented on VM/370, DCE DFS on tin cans and
- string. It just talks about semantic behaviors applications may or may not
- rely upon. An application can inquire if directories can be created below a
- certain path; if device files can be created within a particular path; if
- can application is guaranteed to retain access to a file it has opened even
- if some other process (or itself) unlink()s it; that kind of thing. The
- implementation has to arrange for pathconf() and fpathconf() to return
- correct answers to these questions based on the actual behavior of the
- implementation. The "NFS" annex contains the answers that a typical NFS
- implementation returns, but there's no requirement that any actual
- implementation return those answers.
-
- >Note also that a strictly-conforming application cannot, of course,
- >assume that the data it reads from a directory will have any particular
- >format
-
- Quite true, but within the context of the 1003.1 standard, besides the
- point.
-
- >(I.e., I suspect the sum total of POSIX-system-programmer misery will be
- >increased infinitesimally, if it's increased at all, by just saying Thou
- >Shalt Not Try To "read()" From Directories, Lest Thou Get An Error From
- >"read()".
-
- Perhaps, but I don't know that anyone has tried to make such a change.
-
- >I also suspect that having NFS client implementations reject requests to
- >"read()" from directories will result in more broken programs - e.g.,
- >programs that don't use "opendir()", "readdir()", and company - being
- >caught and, hopefully, fixed.)
-
- NFS client implementations already do this, and just about all the
- applications worth catching are already caught. An application that doesn't
- use opendir() et al for reading directories is already outside the scope of
- POSIX, so the standard should not (and in fact does not) worry about them.
- It would be nice if NFS client implementations diverged as little as
- possible from POSIX.
-
- (Unfortunately, or fortunately, the current draft of 1003.8 does not provide
- a way for an application to inquire if read() is permitted on directories;
- because of the way 1003.8 is structured, this directly implies that the
- behavior in question must be that of 1003.1 for the implementation to
- conform.)
-
- Jason Zions
- As usual, speaking solely as an individual technical expert
-
-
- Volume-Number: Volume 31, Number 88
-
-