diff options
author | Benjamin Peterson <benjamin@python.org> | 2019-11-06 05:58:31 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-11-06 05:58:31 (GMT) |
commit | 5c0c325453a175350e3c18ebb10cc10c37f9595c (patch) | |
tree | fb7bdfa2f63154fe28d31b015d44d409786e1132 /Modules/posixmodule.c | |
parent | 6c4c45efaeb40f4f837570f57d90a0b3429c6ae9 (diff) | |
download | cpython-5c0c325453a175350e3c18ebb10cc10c37f9595c.zip cpython-5c0c325453a175350e3c18ebb10cc10c37f9595c.tar.gz cpython-5c0c325453a175350e3c18ebb10cc10c37f9595c.tar.bz2 |
closes bpo-38713: Expose P_PIDFD in os if it's defined. (GH-17071)
https://bugs.python.org/issue38713
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 46cf7b2..f738630 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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; |