tsee/IPC-ConcurrencyLimit — pull request #2 by ikruglov (2013-11-15 21:51:42+00:00)
Title: implementation of 'fcntl' locking backend

The idea behind introducing new backend was that default
'flock' backend has a disadvantage (or advantage) of survive
across forking. It's potentialy dangerous situation in some cases.
For instance, imagine that IPC::CL::Withstandby is used for building HA pair
of daemons, and daemon does forks after acquiring a lock. Now, if the
main process dies before any child, the standby daemon will fail to
promote itself to main one, because the lock is still held by all
children. The solution to this case would be to either explicitly close
lock file handler after forking, or use another locking mechanism which
is free of this feature.

However, fcntl behaivour is very nasty. So, you should be really
carefull in using it.

Honestly say, after implementing the idea of using fcntl I'm not sure that is was a good one. Simply say, the logic of fcntl locking is very broken. Here is the article which describe all the issue with fcntl (and flock as well) http://0pointer.de/blog/projects/locking.html. Btw, due to that issues fcntl backend failed to pass any test.

I've decided to make a pull request instead of directly pushing (thanks for the access) because I don't have strong opinion on whether we need to provide alternative choice or not. Probably not. If you have any concerns feel free to reject it.