Skip to content

Commit c408a8b

Browse files
committed
Fix GH-11630: proc_nice_basic.phpt only works at certain nice levels
Closes GH-11635.
1 parent 06d87e4 commit c408a8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/standard/tests/general_functions/proc_nice_basic.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ if ($exit_code !== 0) {
3030
$niceBefore = getNice($pid);
3131
proc_nice($delta);
3232
$niceAfter = getNice($pid);
33-
var_dump($niceBefore == ($niceAfter - $delta));
33+
// The maximum niceness level is 19, if the process is already running at a high niceness, it cannot be increased.
34+
// Decreasing is only possible for superusers.
35+
var_dump(min($niceBefore + $delta, 19) == $niceAfter);
3436
?>
3537
--EXPECT--
3638
bool(true)

0 commit comments

Comments
 (0)