write() and read()
Tom Bannon
bannon at betelgeuse.csc.ti.com
Wed Sep 5 10:57:52 AEST 1990
I have a file that will be read and written by multiple processes on multiple
machines. The file is always completely read in one read() or completely
rewritten in one write(). I would like to avoid doing any file locking.
Under UNIX, if a write() returns successfully, am I guaranteed that no reads
started after the write started and before the write completed? i.e. that no
read() is in danger of seeing an inconsistent (partially written) file.
Would this be dependent on the file size? If so would that magic number
be well defined in the system header files?
Would shared filesystems such as NFS have any effect on this?
Is this property likely to be present under other OSes, say like VMS?
Thanks in advance,
Tom
bannon at csc.ti.com
More information about the Comp.unix.wizards
mailing list