fopen ( .., \"a\" ) --- how does the \"a\" work?

Leslie Mikesell les at chinet.chi.il.us
Thu Dec 14 15:59:34 AEST 1989


In article <21726 at adm.BRL.MIL> Kemp at DOCKMASTER.NCSC.MIL writes:
>Michael Meissner writes:

> > On a filesystem local to the machine, this [seeking to EOF] is
> > done atomically with the write call.  I'm not sure whether this
> > is guaranteed to be atomic under NFS, but I suspect not, particularly
> > if the NFS server is not a UNIX system (such as a VAX running VMS
> > or IBM mainframe).

>This has *nothing* to do with the NFS server.  The client is responsible
>for maintaining whatever state is associated with the open file,
>including the seek position.

Which means that it can't be guaranteed to know the current EOF position
if there are multiple writers.  The server knows the EOF position, of
course, but doesn't accept "append" requests.  With a stateless protocol
the possibility would then exist for a request to succeed, but the
ack back to the client to be lost resulting it a retry on the request.
If another "append" request intervened before the retry, the write
would be duplicated in different places.


Les Mikesell
  les at chinet.chi.il.us



More information about the Comp.unix.questions mailing list