An NFS-safe file-based lock library for Python.

Registered 2010-11-04 by Barry Warsaw

This is what used to be called `locknix`.

The ``flufl.lock`` library provides an NFS-safe file-based locking algorithm
influenced by the GNU/Linux `open(2)` manpage, under the description of the
`O_EXCL` option::

        [...] O_EXCL is broken on NFS file systems, programs which rely on it
        for performing locking tasks will contain a race condition. The
        solution for performing atomic file locking using a lockfile is to
        create a unique file on the same fs (e.g., incorporating hostname and
        pid), use link(2) to make a link to the lockfile. If link() returns
        0, the lock is successful. Otherwise, use stat(2) on the unique file
        to check if its link count has increased to 2, in which case the lock
        is also successful.

This replaces http://launchpad.net/locknix

Project information

Maintainer:
Barry Warsaw
Driver:
Not yet selected
Development focus:

trunk series 

lp:flufl.lock 
Browse the code

Programming Languages:
Python
Licences:
GNU LGPL v3
()

RDF metadata

View full history Series and milestones

flufl.lock trunk series is the current focus of development

More contributors Top contributors

All packages Packages in Distributions

Get Involved

  • Report a bug
  • warning
    Ask a question
  • warning
    Help translate

Downloads

Latest version is 2.2.1
released on 2012-04-19

All downloads