Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!aplcen!haven!adm!xadmx!Kemp@DOCKMASTER.NCSC.MIL From: Kemp@DOCKMASTER.NCSC.MIL Newsgroups: comp.unix.questions Subject: Re: fopen ( .., \"a\" ) --- how does the \"a\" work? Message-ID: <21726@adm.BRL.MIL> Date: 12 Dec 89 16:17:03 GMT Sender: news@adm.BRL.MIL Lines: 32 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. From the NFS Protocol Spec, Version 2: NFSPROC_WRITE(writeargs) struct writeargs { fhandle file; unsigned beginoffset; unsigned offset; unsigned totalcount; opaque data; }; 'Writes "data" beginning at "offset" bytes from the beginning of "file". The first byte of the file is at offset zero. ... The write operation is atomic. Data from this call to WRITE will not be mixed with data from another client's calls. Note: The arguments "beginoffset" and "totalcount" are ignored and are removed in the next protocol revision.' Dave Kemp "My sister is a yahoo"