Re: stale lock files
Roger Leigh <rleigh@whinlatter.ukfsn.org> writes:
> Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de> writes:
>
>> Write the pid and host to the lock file. When you detect a lock and
>> the lock is on the local host then check the pid is still valid. If
>> not the lock is stale. If the lock is from a remote host there is
>> little you can do but ask.
>
> Why not use fcntl/lockf byte region locking on the entire file? It
> gets released as soon as the process terminates, so there are no
> issues with stale locks, and it works over NFS.
>
>
> Regards,
> Roger
NFS isn't everything.
MfG
Goswin
Reply to: