@@ -31,33 +31,54 @@ descriptor.
31
31
raise an :exc: `OSError `.
32
32
33
33
.. versionchanged :: 3.8
34
- The fcntl module now contains ``F_ADD_SEALS ``, ``F_GET_SEALS ``, and
34
+ The :mod: ` ! fcntl` module now contains ``F_ADD_SEALS ``, ``F_GET_SEALS ``, and
35
35
``F_SEAL_* `` constants for sealing of :func: `os.memfd_create ` file
36
36
descriptors.
37
37
38
38
.. versionchanged :: 3.9
39
- On macOS, the fcntl module exposes the ``F_GETPATH `` constant, which obtains
40
- the path of a file from a file descriptor.
41
- On Linux(>=3.15), the fcntl module exposes the ``F_OFD_GETLK ``, `` F_OFD_SETLK ``
42
- and ``F_OFD_SETLKW `` constants, which are used when working with open file
43
- description locks.
39
+ On macOS, the :mod: ` ! fcntl` module exposes the ``F_GETPATH `` constant,
40
+ which obtains the path of a file from a file descriptor.
41
+ On Linux(>=3.15), the :mod: ` ! fcntl` module exposes the ``F_OFD_GETLK ``,
42
+ `` F_OFD_SETLK `` and ``F_OFD_SETLKW `` constants, which are used when working
43
+ with open file description locks.
44
44
45
45
.. versionchanged :: 3.10
46
- On Linux >= 2.6.11, the fcntl module exposes the ``F_GETPIPE_SZ `` and
46
+ On Linux >= 2.6.11, the :mod: ` ! fcntl` module exposes the ``F_GETPIPE_SZ `` and
47
47
``F_SETPIPE_SZ `` constants, which allow to check and modify a pipe's size
48
48
respectively.
49
49
50
50
.. versionchanged :: 3.11
51
- On FreeBSD, the fcntl module exposes the ``F_DUP2FD `` and `` F_DUP2FD_CLOEXEC ``
52
- constants, which allow to duplicate a file descriptor, the latter setting
53
- ``FD_CLOEXEC `` flag in addition.
51
+ On FreeBSD, the :mod: ` ! fcntl` module exposes the ``F_DUP2FD `` and
52
+ `` F_DUP2FD_CLOEXEC `` constants, which allow to duplicate a file descriptor,
53
+ the latter setting ``FD_CLOEXEC `` flag in addition.
54
54
55
55
.. versionchanged :: 3.12
56
56
On Linux >= 4.5, the :mod: `fcntl ` module exposes the ``FICLONE `` and
57
57
``FICLONERANGE `` constants, which allow to share some data of one file with
58
58
another file by reflinking on some filesystems (e.g., btrfs, OCFS2, and
59
59
XFS). This behavior is commonly referred to as "copy-on-write".
60
60
61
+ .. versionchanged :: 3.13
62
+ On Linux >= 2.6.32, the :mod: `!fcntl ` module exposes the
63
+ ``F_GETOWN_EX ``, ``F_SETOWN_EX ``, ``F_OWNER_TID ``, ``F_OWNER_PID ``, ``F_OWNER_PGRP `` constants, which allow to direct I/O availability signals
64
+ to a specific thread, process, or process group.
65
+ On Linux >= 4.13, the :mod: `!fcntl ` module exposes the
66
+ ``F_GET_RW_HINT ``, ``F_SET_RW_HINT ``, ``F_GET_FILE_RW_HINT ``,
67
+ ``F_SET_FILE_RW_HINT ``, and ``RWH_WRITE_LIFE_* `` constants, which allow
68
+ to inform the kernel about the relative expected lifetime of writes on
69
+ a given inode or via a particular open file description.
70
+ On Linux >= 5.1 and NetBSD, the :mod: `!fcntl ` module exposes the
71
+ ``F_SEAL_FUTURE_WRITE `` constant for use with ``F_ADD_SEALS `` and
72
+ ``F_GET_SEALS `` operations.
73
+ On FreeBSD, the :mod: `!fcntl ` module exposes the ``F_READAHEAD ``, ``F_ISUNIONSTACK ``, and ``F_KINFO `` constants.
74
+ On macOS and FreeBSD, the :mod: `!fcntl ` module exposes the ``F_RDAHEAD ``
75
+ constant.
76
+ On NetBSD and AIX, the :mod: `!fcntl ` module exposes the ``F_CLOSEM ``
77
+ constant.
78
+ On NetBSD, the :mod: `!fcntl ` module exposes the ``F_MAXFD `` constant.
79
+ On macOS and NetBSD, the :mod: `!fcntl ` module exposes the ``F_GETNOSIGPIPE ``
80
+ and ``F_SETNOSIGPIPE `` constant.
81
+
61
82
The module defines the following functions:
62
83
63
84
0 commit comments