mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
This commit is contained in:
@@ -13,7 +13,6 @@ if test "$PHP_PCNTL" != "no"; then
|
||||
forkx
|
||||
getcpuid
|
||||
getpriority
|
||||
pidfd_open
|
||||
pset_bind
|
||||
pthread_set_qos_class_self_np
|
||||
rfork
|
||||
@@ -48,6 +47,9 @@ if test "$PHP_PCNTL" != "no"; then
|
||||
AC_CHECK_DECLS([SYS_waitid],,,
|
||||
[#include <sys/syscall.h>])
|
||||
|
||||
AC_CHECK_DECLS([SYS_pidfd_open],,,
|
||||
[#include <sys/syscall.h>])
|
||||
|
||||
dnl if unsupported, -1 means automatically ENOSYS in this context
|
||||
AC_CACHE_CHECK([if sched_getcpu is supported], [php_cv_func_sched_getcpu],
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||
|
||||
@@ -125,18 +125,20 @@ typedef psetid_t cpu_set_t;
|
||||
#include <pthread/qos.h>
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && defined(HAVE_DECL_SYS_WAITID) && HAVE_DECL_SYS_WAITID == 1 && defined(HAVE_SYSCALL)
|
||||
#define HAVE_LINUX_RAW_SYSCALL_WAITID 1
|
||||
#if defined(__linux__) && defined(HAVE_SYSCALL)
|
||||
# include <sys/syscall.h>
|
||||
# if defined(HAVE_DECL_SYS_WAITID) && HAVE_DECL_SYS_WAITID == 1
|
||||
# define HAVE_LINUX_RAW_SYSCALL_WAITID 1
|
||||
# endif
|
||||
# if defined(HAVE_DECL_SYS_PIDFD_OPEN) && HAVE_DECL_SYS_PIDFD_OPEN == 1
|
||||
# define HAVE_LINUX_RAW_SYSCALL_PIDFD_OPEN 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LINUX_RAW_SYSCALL_WAITID)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_PIDFD_OPEN) || defined(HAVE_LINUX_RAW_SYSCALL_WAITID)
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FORKX
|
||||
#include <sys/fork.h>
|
||||
#endif
|
||||
@@ -1607,7 +1609,7 @@ PHP_FUNCTION(pcntl_forkx)
|
||||
#endif
|
||||
/* }}} */
|
||||
|
||||
#ifdef HAVE_PIDFD_OPEN
|
||||
#ifdef HAVE_LINUX_RAW_SYSCALL_PIDFD_OPEN
|
||||
// The `pidfd_open` syscall is available since 5.3
|
||||
// and `setns` since 3.0.
|
||||
PHP_FUNCTION(pcntl_setns)
|
||||
|
||||
Reference in New Issue
Block a user