11 Apr
2014
11 Apr
'14
11:29 a.m.
On 11/04/14 15:47, Alan DeKok wrote:
Arran Cudbard-Bell wrote:
I don't recall why that was changed. There was a reason, right?
Not in any way portable?
Maybe... but it does work somewhere. It may be useful to use flock() where it works. i.e. Linux. That way the systems with sane APIs can get the benefit, and everyone else gets "best effort".
Bear in mind flock() has it's own set of insanities - locks are inherited across fork *and* exec, amongst others. But it's at least consistent with what 2.x has done for years ;o) Assuming it gets accepted and BSD/MacOS follow suit, F_SETLKP should fix fcntl() locking and this should, finally, go away.