closes bpo-38713: Expose P_PIDFD in os if it's defined. (GH-17071)

https://bugs.python.org/issue38713
This commit is contained in:
Benjamin Peterson 2019-11-05 21:58:31 -08:00 committed by Miss Islington (bot)
parent 6c4c45efae
commit 5c0c325453
7 changed files with 40 additions and 6 deletions

View file

@ -3921,7 +3921,8 @@ written in Python, such as a mail server's external command delivery program.
.. function:: waitid(idtype, id, options)
Wait for the completion of one or more child processes.
*idtype* can be :data:`P_PID`, :data:`P_PGID` or :data:`P_ALL`.
*idtype* can be :data:`P_PID`, :data:`P_PGID`, :data:`P_ALL`, or
:data:`P_PIDFD` on Linux.
*id* specifies the pid to wait on.
*options* is constructed from the ORing of one or more of :data:`WEXITED`,
:data:`WSTOPPED` or :data:`WCONTINUED` and additionally may be ORed with
@ -3946,6 +3947,15 @@ written in Python, such as a mail server's external command delivery program.
.. versionadded:: 3.3
.. data:: P_PIDFD
This is a Linux-specific *idtype* that indicates that *id* is a file
descriptor that refers to a process.
.. availability:: Linux 5.4+
.. versionadded:: 3.9
.. data:: WEXITED
WSTOPPED
WNOWAIT