[issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux

Stéphane Wirtel report at bugs.python.org
Sat Aug 6 07:04:25 EDT 2016


Stéphane Wirtel added the comment:

If you read the documentation from glibc-2.24, these options are only available on BSD and not on Linux.

"""
The remaining operating modes are BSD extensions. They exist only on some systems. On other systems, these macros are not defined.

Macro: int O_SHLOCK
Acquire a shared lock on the file, as with flock. See File Locks.

If O_CREAT is specified, the locking is done atomically when creating the file. You are guaranteed that no other process will get the lock on the new file first.

Macro: int O_EXLOCK
Acquire an exclusive lock on the file, as with flock. See File Locks. This is atomic like O_SHLOCK.
"""

With my fedora 24, and glibc 2.23 I don't find any reference to these macros.

----------
nosy: +matrixise

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23105>
_______________________________________


More information about the Python-bugs-list mailing list