OlegDB icon indicating copy to clipboard operation
OlegDB copied to clipboard

flock(2) vs lockf(3)/fcntl(2)

Open Hamcha opened this issue 11 years ago • 0 comments

Solaris lacks flock(2), and it seems lockf(3)/fcntl(2) is better anyway for more reasons (can lock over NFS and things like that, not that we really care).

This is an interesting (and long) man 2.0 page (aka StackOverflow answer) on the matter: http://stackoverflow.com/questions/22409780/flock-vs-lockf-on-linux

Dunno about support on all the OSs, though, our current targets (FreeBSD, Linux, Solaris) all support it. OS X seems to like fcntl(2) more as well, and Windows.. well it's not like that thing supports either.

Hamcha avatar Nov 27 '14 16:11 Hamcha