[Info-vax] Multiple File Readers/Writers

JF Mezei jfmezei.spamnot at vaxination.ca
Thu Nov 24 21:17:19 EST 2011


Matt wrote:
>
> What combination of parameters do I need to pass to the 'open' call to
> get the file sharing to work properly so that the reader does not get
> stale data?


You have added the "shr=" parameter to the open statement.

If you start the writer first, and have the same "shr" options in the
reader, and the reader is able to succesfully open the file, then those
options are OK.

However, with regards to C I/O, the reader may not see recently written
stuff. There is the fsynch() routine if I remember well which causes the
writes to be flushed to disk so other processes can see the data. (it
could also be just synch() , it has been a while.



More information about the Info-vax mailing list