Skip to content

Commit f2e4894

Browse files
vstinnersrinivasreddy
authored andcommitted
pythongh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (python#127593)
1 parent 655ae54 commit f2e4894

File tree

5 files changed

+15
-1
lines changed

5 files changed

+15
-1
lines changed
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

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
#ifdef HAVE_SYS_TIME_H
7474
# include <sys/time.h> // futimes()
7575
#endif
76+
#ifdef HAVE_SYS_PIDFD_H
77+
# include <sys/pidfd.h> // PIDFD_NONBLOCK
78+
#endif
7679

7780

7881
// SGI apparently needs this forward declaration

configure

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -2932,7 +2932,7 @@ AC_CHECK_HEADERS([ \
29322932
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 \
29332933
sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \
29342934
sys/endian.h sys/epoll.h sys/event.h sys/eventfd.h sys/file.h sys/ioctl.h sys/kern_control.h \
2935-
sys/loadavg.h sys/lock.h sys/memfd.h sys/mkdev.h sys/mman.h sys/modem.h sys/param.h sys/poll.h \
2935+
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 \
29362936
sys/random.h sys/resource.h sys/select.h sys/sendfile.h sys/socket.h sys/soundcard.h sys/stat.h \
29372937
sys/statvfs.h sys/sys_domain.h sys/syscall.h sys/sysmacros.h sys/termio.h sys/time.h sys/times.h sys/timerfd.h \
29382938
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

+3
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,9 @@
13881388
/* Define to 1 if you have the <sys/param.h> header file. */
13891389
#undef HAVE_SYS_PARAM_H
13901390

1391+
/* Define to 1 if you have the <sys/pidfd.h> header file. */
1392+
#undef HAVE_SYS_PIDFD_H
1393+
13911394
/* Define to 1 if you have the <sys/poll.h> header file. */
13921395
#undef HAVE_SYS_POLL_H
13931396

0 commit comments

Comments
 (0)