Skip to content

Commit

Permalink
Fix GH-11630: proc_nice_basic.phpt only works at certain nice levels
Browse files Browse the repository at this point in the history
Closes GH-11635.
  • Loading branch information
nielsdos committed Jul 10, 2023
1 parent 06d87e4 commit c408a8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/standard/tests/general_functions/proc_nice_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ if ($exit_code !== 0) {
$niceBefore = getNice($pid);
proc_nice($delta);
$niceAfter = getNice($pid);
var_dump($niceBefore == ($niceAfter - $delta));
// The maximum niceness level is 19, if the process is already running at a high niceness, it cannot be increased.
// Decreasing is only possible for superusers.
var_dump(min($niceBefore + $delta, 19) == $niceAfter);
?>
--EXPECT--
bool(true)

0 comments on commit c408a8b

Please sign in to comment.