Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
  support running testsuite with negative niceness (#11481)
This commit is contained in:
Ilija Tovilo 2023-09-22 11:33:36 +02:00
commit 88f6b5288f
No known key found for this signature in database
GPG Key ID: A4F5D403F118200A

View File

@ -19,7 +19,7 @@ if ($exit_code !== 0) {
function getNice($id)
{
$res = shell_exec('ps -p ' . $id .' -o "pid,nice"');
preg_match('/^\s*\w+\s+\w+\s*(\d+)\s+(\d+)/m', $res, $matches);
preg_match('/^\s*\w+\s+\w+\s*(\d+)\s+(-?\d+)/m', $res, $matches);
if (count($matches) > 2)
return $matches[2];
else