summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-11-07 15:51:41 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-11-07 15:51:41 (GMT)
commit589327ea7a723de32c858d258f91c7a625a052c0 (patch)
tree46a08d826b7ae4d49757c264053cd25bdecf3a78 /Doc
parentefa7a0e155e508f21dd7ace708b311066637538f (diff)
parentd5a2f0b3a13974e4a62d088aee6f920262c37add (diff)
downloadcpython-589327ea7a723de32c858d258f91c7a625a052c0.zip
cpython-589327ea7a723de32c858d258f91c7a625a052c0.tar.gz
cpython-589327ea7a723de32c858d258f91c7a625a052c0.tar.bz2
Merge #18985: Improve fcntl documentation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/fcntl.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst
index cc77340..8e932fb 100644
--- a/Doc/library/fcntl.rst
+++ b/Doc/library/fcntl.rst
@@ -30,11 +30,11 @@ The module defines the following functions:
.. function:: fcntl(fd, op[, arg])
- Perform the requested operation on file descriptor *fd* (file objects providing
- a :meth:`~io.IOBase.fileno` method are accepted as well). The operation is
- defined by *op*
- and is operating system dependent. These codes are also found in the
- :mod:`fcntl` module. The argument *arg* is optional, and defaults to the integer
+ Perform the operation *op* on file descriptor *fd* (file objects providing
+ a :meth:`~io.IOBase.fileno` method are accepted as well). The values used
+ for *op* are operating system dependent, and are available as constants
+ in the :mod:`fcntl` module, using the same names as used in the relevant C
+ header files. The argument *arg* is optional, and defaults to the integer
value ``0``. When present, it can either be an integer value, or a string.
With the argument missing or an integer value, the return value of this function
is the integer return value of the C :c:func:`fcntl` call. When the argument is
@@ -56,6 +56,9 @@ The module defines the following functions:
that the argument handling is even more complicated.
The op parameter is limited to values that can fit in 32-bits.
+ Additional constants of interest for use as the *op* argument can be
+ found in the :mod:`termios` module, under the same names as used in
+ the relevant C header files.
The parameter *arg* can be one of an integer, absent (treated identically to the
integer ``0``), an object supporting the read-only buffer interface (most likely