Fix GH-11630: proc_nice_basic.phpt only works at certain nice levels

Closes GH-11635.
This commit is contained in:
Niels Dossche 2023-07-08 17:34:52 +02:00
parent 06d87e4c14
commit c408a8b604

View File

@ -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)