Skip to content

Commit 1087383

Browse files
Doc: fcntl.lockf() is more powerful than written (GH-6750)
(cherry picked from commit 77cd0ce) Co-authored-by: Eric O. LEBIGOT (EOL) <[email protected]>
1 parent e6b14c0 commit 1087383

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/fcntl.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ The module defines the following functions:
120120
.. function:: lockf(fd, cmd, len=0, start=0, whence=0)
121121

122122
This is essentially a wrapper around the :func:`~fcntl.fcntl` locking calls.
123-
*fd* is the file descriptor of the file to lock or unlock, and *cmd*
123+
*fd* is the file descriptor (file objects providing a :meth:`~io.IOBase.fileno`
124+
method are accepted as well) of the file to lock or unlock, and *cmd*
124125
is one of the following values:
125126

126127
* :const:`LOCK_UN` -- unlock
@@ -171,4 +172,3 @@ using the :func:`flock` call may be better.
171172
present in the :mod:`os` module (on BSD only), the :func:`os.open`
172173
function provides an alternative to the :func:`lockf` and :func:`flock`
173174
functions.
174-

0 commit comments

Comments
 (0)