On Wed, 2 Nov 2005, Antal wrote:
How can be avoided in Linux the file corruption due to simultaneous write
access from two different process?
Or how can it be avoided to access the same file by two different process?
I experienced a few (but painful) data loss due to this problem, and I'm
unable to solve the problem.
You can use the fpflock call (unit 'unix') to lock (parts of) a file.
But be aware that BOTH processes must use this mechanism;
File locking is optional on Linux.
Nothing prevents a third process from using the file without locks.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal