]> granicus.if.org Git - php/commitdiff
Fix test for proc_nice: bsd ps command didn't support option -o "%p %n"
authorreeze <reeze.xia@gmail.com>
Sun, 29 Apr 2012 16:59:54 +0000 (00:59 +0800)
committerreeze <reeze.xia@gmail.com>
Sun, 29 Apr 2012 16:59:54 +0000 (00:59 +0800)
ext/standard/tests/general_functions/proc_nice_basic.phpt

index 3a958901a240e8238c73fc7763af3d291c58e121..b64eab1309e5a9425265d87d162385ac86506e84 100644 (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];