[fpc-pascal] (Unix) file locking
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Jun 20 21:09:15 CEST 2016
On 20/06/16 11:28, Mark Morgan Lloyd wrote:
> I'm approaching a situation where up to four identical processes will be
> reading and writing the same files. There will be process-level
> synchronisation which should prevent clashes, but I'd still like to add
> locking at the file level.
If you use sysutils.fileopen, file locking will automatically be used
based on fmShare* constants you specify:
http://www.freepascal.org/docs-html/current/rtl/sysutils/fileopen.html
Jonas
More information about the fpc-pascal
mailing list