From e887d5293924085955fa1b013499c2520431d22b Mon Sep 17 00:00:00 2001 From: Fco Javier Felix Date: Sat, 28 Nov 2026 01:10:40 +0100 Subject: [PATCH] Fix proc_nice_basic.phpt in a PID namespace The test compares the niceness that ps reports for getmypid(). In a PID namespace whose /proc still belongs to the parent namespace, as in Gentoo's Portage pid-sandbox or "unshare -Urpf", getmypid() is a PID of the new namespace and ps looks up an unrelated process of the parent one (PID 1 is the host's init), or fails with "fatal library error, lookup self", so the test fails. On Linux, read the niceness with nice(1) instead: a child inherits the niceness of the calling process, whatever namespace ps would look in. Other systems keep using ps. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01N8fTR5F9qkNs7QLgr6V3Ei --- .../tests/general_functions/proc_nice_basic.phpt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ext/standard/tests/general_functions/proc_nice_basic.phpt b/ext/standard/tests/general_functions/proc_nice_basic.phpt index 9e73a7f890b1..08875414c35e 100644 --- a/ext/standard/tests/general_functions/proc_nice_basic.phpt +++ b/ext/standard/tests/general_functions/proc_nice_basic.phpt @@ -9,15 +9,20 @@ Simone Gentili (sensorario@gmail.com) --FILE-- 2)