aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Doc/library/fcntl.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/fcntl.rst')
-rw-r--r--Doc/library/fcntl.rst24
1 files changed, 15 insertions, 9 deletions
diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst
index b4ea3e7e31b..5c078df44ff 100644
--- a/Doc/library/fcntl.rst
+++ b/Doc/library/fcntl.rst
@@ -79,7 +79,7 @@ descriptor.
On macOS and NetBSD, the :mod:`!fcntl` module exposes the ``F_GETNOSIGPIPE``
and ``F_SETNOSIGPIPE`` constant.
-.. versionchanged:: next
+.. versionchanged:: 3.14
On Linux >= 6.1, the :mod:`!fcntl` module exposes the ``F_DUPFD_QUERY``
to query a file descriptor pointing to the same file.
@@ -107,24 +107,27 @@ The module defines the following functions:
passed to the C :c:func:`fcntl` call. The return value after a successful
call is the contents of the buffer, converted to a :class:`bytes` object.
The length of the returned object will be the same as the length of the
- *arg* argument. This is limited to 1024 bytes.
+ *arg* argument.
If the :c:func:`fcntl` call fails, an :exc:`OSError` is raised.
.. note::
- If the type or the size of *arg* does not match the type or size
- of the argument of the operation (for example, if an integer is
+ If the type or size of *arg* does not match the type or size
+ of the operation's argument (for example, if an integer is
passed when a pointer is expected, or the information returned in
- the buffer by the operating system is larger than 1024 bytes),
+ the buffer by the operating system is larger than the size of *arg*),
this is most likely to result in a segmentation violation or
a more subtle data corruption.
.. audit-event:: fcntl.fcntl fd,cmd,arg fcntl.fcntl
- .. versionchanged:: next
+ .. versionchanged:: 3.14
Add support of arbitrary :term:`bytes-like objects <bytes-like object>`,
not only :class:`bytes`.
+ .. versionchanged:: next
+ The size of bytes-like objects is no longer limited to 1024 bytes.
+
.. function:: ioctl(fd, request, arg=0, mutate_flag=True, /)
@@ -161,8 +164,7 @@ The module defines the following functions:
If the type or size of *arg* does not match the type or size
of the operation's argument (for example, if an integer is
passed when a pointer is expected, or the information returned in
- the buffer by the operating system is larger than 1024 bytes,
- or the size of the mutable bytes-like object is too small),
+ the buffer by the operating system is larger than the size of *arg*),
this is most likely to result in a segmentation violation or
a more subtle data corruption.
@@ -181,10 +183,14 @@ The module defines the following functions:
.. audit-event:: fcntl.ioctl fd,request,arg fcntl.ioctl
- .. versionchanged:: next
+ .. versionchanged:: 3.14
The GIL is always released during a system call.
System calls failing with EINTR are automatically retried.
+ .. versionchanged:: next
+ The size of not mutated bytes-like objects is no longer
+ limited to 1024 bytes.
+
.. function:: flock(fd, operation, /)
Perform the lock operation *operation* on file descriptor *fd* (file objects providing