flock(3)-based locks.
Wins:
Locks do not survive crashes of either the system or the
application.
Waiting for a lock is handled by the kernel and doesn't require
polling
Potentially compatible with NFS or other shared filesystem
if you trust their lockd (or equivalent) implemenation.
Note that this is a big if!
No false positives on stale locks
Loses:
|