infoforcefeed / OlegDB

Enough works to use this in production

Home Page:http://olegdb.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Hamcha opened this issue · 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.