News for hackers. Stuff that matters.
Re:“POSIX advisory locks are broken by design” by wahern on Tuesday July 24, 2018 @06:01PM (#17605317)
You can also use the BSD extension, flock(2), which is supported everywhere except commercial SysV clones like Solaris and HP/UX. flock has the semantics you would expect[1] and isn't Linux-only.

This LWN article has a great explanation of all the behaviors: https://lwn.net/Articles/586904/

[1] Effectively identical to the Linux extension/POSIX proposal except that (1) they don't support ranges, (2) don't contend with POSIX locks (they do on real BSDs but not Linux), and (3) BSD flock won't work across NFS.

Re:“POSIX advisory locks are broken by design” by amerianwookie on Tuesday July 24, 2018 @06:34PM (#17605485)
I was under the impression that since[1] 2.6.12, when using BSD flock(), NFS will use POSIX locks that emulate BSD locking behavior and work over NFS. So long as you use consistent NFS implementations, shouldn't this work?

[1] http://nfs.sourceforge.net/#faq_d10

Re:“POSIX advisory locks are broken by design” by wahern on Tuesday July 24, 2018 @07:27PM (#17605746)
I stand corrected.