mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593)
This commit is contained in:
		
							parent
							
								
									1ef6e8ca3f
								
							
						
					
					
						commit
						fcbe6ecdb6
					
				
					 5 changed files with 15 additions and 1 deletions
				
			
		|  | @ -0,0 +1,2 @@ | ||||||
|  | Include ``<sys/pidfd.h>`` to get ``os.PIDFD_NONBLOCK`` constant. Patch by | ||||||
|  | Victor Stinner. | ||||||
|  | @ -73,6 +73,9 @@ | ||||||
| #ifdef HAVE_SYS_TIME_H | #ifdef HAVE_SYS_TIME_H | ||||||
| #  include <sys/time.h>           // futimes()
 | #  include <sys/time.h>           // futimes()
 | ||||||
| #endif | #endif | ||||||
|  | #ifdef HAVE_SYS_PIDFD_H | ||||||
|  | #  include <sys/pidfd.h>          // PIDFD_NONBLOCK
 | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // SGI apparently needs this forward declaration
 | // SGI apparently needs this forward declaration
 | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								configure
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								configure
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -11178,6 +11178,12 @@ if test "x$ac_cv_header_sys_param_h" = xyes | ||||||
| then : | then : | ||||||
|   printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h |   printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h | ||||||
| 
 | 
 | ||||||
|  | fi | ||||||
|  | ac_fn_c_check_header_compile "$LINENO" "sys/pidfd.h" "ac_cv_header_sys_pidfd_h" "$ac_includes_default" | ||||||
|  | if test "x$ac_cv_header_sys_pidfd_h" = xyes | ||||||
|  | then : | ||||||
|  |   printf "%s\n" "#define HAVE_SYS_PIDFD_H 1" >>confdefs.h | ||||||
|  | 
 | ||||||
| fi | fi | ||||||
| ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default" | ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default" | ||||||
| if test "x$ac_cv_header_sys_poll_h" = xyes | if test "x$ac_cv_header_sys_poll_h" = xyes | ||||||
|  |  | ||||||
|  | @ -2932,7 +2932,7 @@ AC_CHECK_HEADERS([ \ | ||||||
|   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 \ |   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 \ | ||||||
|   sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \ |   sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \ | ||||||
|   sys/endian.h sys/epoll.h sys/event.h sys/eventfd.h sys/file.h sys/ioctl.h sys/kern_control.h \ |   sys/endian.h sys/epoll.h sys/event.h sys/eventfd.h sys/file.h sys/ioctl.h sys/kern_control.h \ | ||||||
|   sys/loadavg.h sys/lock.h sys/memfd.h sys/mkdev.h sys/mman.h sys/modem.h sys/param.h sys/poll.h \ |   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 \ | ||||||
|   sys/random.h sys/resource.h sys/select.h sys/sendfile.h sys/socket.h sys/soundcard.h sys/stat.h \ |   sys/random.h sys/resource.h sys/select.h sys/sendfile.h sys/socket.h sys/soundcard.h sys/stat.h \ | ||||||
|   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 \ |   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 \ | ||||||
|   sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h sys/xattr.h sysexits.h syslog.h \ |   sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h sys/xattr.h sysexits.h syslog.h \ | ||||||
|  |  | ||||||
|  | @ -1388,6 +1388,9 @@ | ||||||
| /* Define to 1 if you have the <sys/param.h> header file. */ | /* Define to 1 if you have the <sys/param.h> header file. */ | ||||||
| #undef HAVE_SYS_PARAM_H | #undef HAVE_SYS_PARAM_H | ||||||
| 
 | 
 | ||||||
|  | /* Define to 1 if you have the <sys/pidfd.h> header file. */ | ||||||
|  | #undef HAVE_SYS_PIDFD_H | ||||||
|  | 
 | ||||||
| /* Define to 1 if you have the <sys/poll.h> header file. */ | /* Define to 1 if you have the <sys/poll.h> header file. */ | ||||||
| #undef HAVE_SYS_POLL_H | #undef HAVE_SYS_POLL_H | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner