8000 [3.12] gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593… · python/cpython@288d6d0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 288d6d0

Browse files
authored
[3.12] gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593) (#127631)
gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593) (cherry picked from commit fcbe6ec)
1 parent 8e3c2d2 commit 288d6d0

File tree

5 files changed

+15
-1
lines changed

5 files changed

+15
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Include ``<sys/pidfd.h>`` to get ``os.PIDFD_NONBLOCK`` constant. Patch by
2+
Victor Stinner.

Modules/posixmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161

6262
#include <stdio.h> // ctermid()
6363
#include <stdlib.h> // system()
64+
#ifdef HAVE_SYS_PIDFD_H
65+
# include <sys/pidfd.h> // PIDFD_NONBLOCK
66+
#endif
6467

6568
/*
6669
* A number of APIs are available on macOS from a certain macOS version.

configure

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2874,7 +2874,7 @@ AC_CHECK_HEADERS([ \
28742874
linux/tipc.h linux/wait.h netdb.h net/ethernet.h netinet/in.h netpacket/packet.h poll.h process.h pthread.h pty.h \
28752875
sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \
28762876
sys/endian.h sys/epoll.h sys/event.h sys/eventfd.h sys/file.h sys/ioctl.h sys/kern_control.h \
2877-
sys/loadavg.h sys/lock.h sys/memfd.h sys/mkdev.h sys/mman.h sys/modem.h sys/param.h sys/poll.h \
2877+
sys/loadavg.h sys/lock.h sys/memfd.h sys/mkdev.h sys/mman.h sys/modem.h sys/param.h sys/pidfd.h sys/poll.h \
28782878
sys/random.h sys/resource.h sys/select.h sys/sendfile.h sys/socket.h sys/soundcard.h sys/stat.h \
28792879
sys/statvfs.h sys/sys_domain.h sys/syscall.h sys/sysmacros.h sys/termio.h sys/time.h sys/times.h \
28802880
sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h sys/xattr.h sysexits.h syslog.h \

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,9 @@
13321332
/* Define to 1 if you have the <sys/param.h> header file. */
13331333
#undef HAVE_SYS_PARAM_H
13341334

1335+
/* Define to 1 if you have the <sys/pidfd.h> header file. */
1336+
#undef HAVE_SYS_PIDFD_H
1337+
13351338
/* Define to 1 if you have the <sys/poll.h> header file. */
13361339
#undef HAVE_SYS_POLL_H
13371340

0 commit comments

Comments
 (0)
0