Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.questions Subject: Re: fopen ( .., \"a\" ) --- how does the \"a\" work? Message-ID: <1989Dec14.045934.13669@chinet.chi.il.us> Date: 14 Dec 89 04:59:34 GMT References: <21726@adm.BRL.MIL> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Chicago Public Access UNIX Lines: 24 In article <21726@adm.BRL.MIL> Kemp@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@chinet.chi.il.us