mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-127385: Add F_DUPFD_QUERY to fcntl (GH-127386)
This commit is contained in:
parent
eef49c3595
commit
8e18a9dce2
3 changed files with 8 additions and 0 deletions
|
@ -79,6 +79,10 @@ descriptor.
|
|||
On macOS and NetBSD, the :mod:`!fcntl` module exposes the ``F_GETNOSIGPIPE``
|
||||
and ``F_SETNOSIGPIPE`` constant.
|
||||
|
||||
.. versionchanged:: next
|
||||
On Linux >= 6.1, the :mod:`!fcntl` module exposes the ``F_DUPFD_QUERY``
|
||||
to query a file descriptor pointing to the same file.
|
||||
|
||||
The module defines the following functions:
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Add the ``F_DUPFD_QUERY`` constant to the :mod:`fcntl` module.
|
|
@ -559,6 +559,9 @@ all_ins(PyObject* m)
|
|||
#ifdef F_NOTIFY
|
||||
if (PyModule_AddIntMacro(m, F_NOTIFY)) return -1;
|
||||
#endif
|
||||
#ifdef F_DUPFD_QUERY
|
||||
if (PyModule_AddIntMacro(m, F_DUPFD_QUERY)) return -1;
|
||||
#endif
|
||||
/* Old BSD flock(). */
|
||||
#ifdef F_EXLCK
|
||||
if (PyModule_AddIntMacro(m, F_EXLCK)) return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue