1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 09:03:04 +02:00

Merge branch 'fix-pro_nice-test' of https://github.com/reeze/php-src into PHP-5.3

This commit is contained in:
Xinchen Hui
2012-04-30 12:29:15 +08:00

View File

@@ -13,7 +13,7 @@ if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
<?php
function getNice($id)
{
$res = shell_exec('ps -p ' . $id .' -o "%p %n"');
$res = shell_exec('ps -p ' . $id .' -o pid -o ni');
preg_match('/^\s*\w+\s+\w+\s*(\d+)\s+(\d+)/m', $res, $matches);
if (count($matches) > 2)
return $matches[2];