Skip to content

Commit

Permalink
Fix phpGH-11630: proc_nice_basic.phpt only works at certain nice levels
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdos committed Jul 8, 2023
1 parent bbe72f1 commit d3df371
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 d3df371

Please sign in to comment.