8000 gh-101100: Fix broken xrefs in fcntl module doc by smontanaro · Pull Request #115691 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-101100: Fix broken xrefs in fcntl module doc #115691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more changes, especially related to LOCK_* constants
  • Loading branch information
smontanaro committed Feb 21, 2024
commit 2dd471bf41460c54adad0bf17437a6494e6f9f81
28 changes: 20 additions & 8 deletions Doc/library/fcntl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@

----------------

This module performs file control and I/O control on file
descriptors. See the :manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix
manual pages for full details.
This module performs file and I/O control on file descriptors. It is
an interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines.
See the :manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages
for full details.

.. availability:: Unix, not Emscripten, not WASI.

Expand Down Expand Up @@ -175,12 +176,23 @@ The module defines the following functions:
method are accepted as well) of the file to lock or unlock, and *cmd*
is one of the following values:

* :const:`!LOCK_UN` -- unlock
* :const:`!LOCK_SH` -- acquire a shared lock
* :const:`!LOCK_EX` -- acquire an exclusive lock
.. data:: LOCK_UN

release an existing lock

.. data:: LOCK_SH

acquire a shared lock

.. data:: LOCK_EX

acquire an exclusive lock
smontanaro marked this conversation as resolved.
Show resolved Hide resolved

.. data:: LOCK_NB

bitwise OR with any of the other three constantsoperations to make
the request non-blocking.

When *cmd* is :const:`!LOCK_SH` or :const:`!LOCK_EX`, it can also be
bitwise ORed with :const:`!LOCK_NB` to avoid blocking on lock acquisition.
If :const:`!LOCK_NB` is used and the lock cannot be acquired, an
:exc:`OSError` will be raised and the exception will have an *errno*
attribute set to :data:`~errno.EACCES` or :data:`~errno.EAGAIN` (depending on the
Expand Down
0