On 2013-03-08, at 2:12 AM, Tethys wrote: > : flock() does not lock files over NFS. Use fcntl(2) instead: that does > : work over NFS, given a sufficiently recent version of Linux and a > : server which supports locking.
NFS is a bit of a no-mans land in this regard. The is no consistency between OSes as to what works over NFS[234]. Or CIFS, AFS, 9fs, or any number of other networked filesystems. POSIX says fcntl() is it, so we must support that. But I'm not sure we can guarantee that we don't do anything that will cause us to unintentionally lose locks. Making this sort of proof is tricky, and requires a lot of discipline to maintain moving forward. Having flock() as an alternative decreases the potential for accidental lock lossage. I very much want the option of using it when it's available. (And on the systems I use, flock() does work over NFS mounts.) --lyndon _______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
