Skip to content

Commit e52be10

Browse files
committed
Fix test for proc_nice: bsd ps command didn't support option -o "%p %n"
1 parent 381edb4 commit e52be10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/tests/general_functions/proc_nice_basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
1313
<?php
1414
function getNice($id)
1515
{
16-
$res = shell_exec('ps -p ' . $id .' -o "%p %n"');
16+
$res = shell_exec('ps -p ' . $id .' -o pid -o ni');
1717
preg_match('/^\s*\w+\s+\w+\s*(\d+)\s+(\d+)/m', $res, $matches);
1818
if (count($matches) > 2)
1919
return $matches[2];

0 commit comments

Comments
 (0)