mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
closes bpo-38713: Expose P_PIDFD in os if it's defined. (GH-17071)
https://bugs.python.org/issue38713
This commit is contained in:
parent
6c4c45efae
commit
5c0c325453
7 changed files with 40 additions and 6 deletions
|
|
@ -85,6 +85,9 @@ corresponding Unix manual entries for more information on calls.");
|
|||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h> /* For WNOHANG */
|
||||
#endif
|
||||
#ifdef HAVE_LINUX_WAIT_H
|
||||
#include <linux/wait.h> // For P_PIDFD
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
|
|
@ -14099,6 +14102,9 @@ all_ins(PyObject *m)
|
|||
if (PyModule_AddIntMacro(m, P_PID)) return -1;
|
||||
if (PyModule_AddIntMacro(m, P_PGID)) return -1;
|
||||
if (PyModule_AddIntMacro(m, P_ALL)) return -1;
|
||||
#ifdef P_PIDFD
|
||||
if (PyModule_AddIntMacro(m, P_PIDFD)) return -1;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef WEXITED
|
||||
if (PyModule_AddIntMacro(m, WEXITED)) return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue