[pypy-issue] [issue747] fcntl.lockf() is broken with (fcntl.LOCK_EX | fcntl.LOCK_NB)

Nirbheek Chauhan tracker at bugs.pypy.org
Sat Jun 11 09:03:22 CEST 2011

New submission from Nirbheek Chauhan <nirbheek.chauhan at gmail.com>:

While trying to lock a file with a pre-existing lock on it, lockf() doesn't
raise EACCESS, and just silently returns instead. This behaviour is both wrong,
and inconsistent with PyPy's flock() behaviour, and CPython's lockf() and
flock() behaviour.

The script attached should demonstrate the problem. Run it under CPython, and
it'll exit fine, execute with PyPy, and it fails. Replace fcntl.lockf with
fcntl.flock and it works fine again.

files: test_lock_nonblock.py
messages: 2621
nosy: nirbheek, pypy-issue
priority: bug
release: 1.5
status: unread
title: fcntl.lockf() is broken with (fcntl.LOCK_EX | fcntl.LOCK_NB)

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list