On 11/2/05, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > 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? > > Nothing prevents a third process from using the file without locks.
that was what i thought too. but that link i posted seemed to imply that, if you mounted the filesystem with an extra flag, that the kernel would cause any regular process to wait for access to files, if those files had been "flocked" by any one process, so it then only takes 1 process using the "flock" calls to get exclusive access. from the link : "In these cases, you can enforce locking at the kernel level with mandatory locks. Mandatory locking is implemented on a file-by-file basis. When a program attempts to lock a file with lockf or fcntl that has mandatory locking set, the kernel will prevent all other programs from accessing the file.[1] Processes which use flock will not trigger a mandatory lock." > > Michael. Tony _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal