Skip to content

Commit e861608

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: ext/pcntl: fix pcntl_getcpuaffinity() for solaris.
2 parents 13411ef + 37fe144 commit e861608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ typedef cpuset_t *cpu_set_t;
9494
#elif defined(HAVE_PSET_BIND)
9595
#include <sys/pset.h>
9696
typedef psetid_t cpu_set_t;
97-
#define sched_getaffinity(p, c, m) pset_bind(PS_QUERY, P_PID, (p <= 0 ? getpid() : p), &m)
97+
#define sched_getaffinity(p, c, m) pset_bind(PS_QUERY, P_PID, p, &m)
9898
#define sched_setaffinity(p, c, m) pset_bind(m, P_PID, (p <= 0 ? getpid() : p), NULL)
9999
#define PCNTL_CPUSET(mask) mask
100100
#define PCNTL_CPU_ISSET(i, mask) (pset_assign(PS_QUERY, (processorid_t)i, &query) == 0 && query == mask)

0 commit comments

Comments
 (0)