com php-src: Fix test for proc_nice: bsd ps command didn't support option -o "%p %n": ex t/standard/tests/general_functions/proc_nice_basic.phpt
| From: | Xinchen Hui | Date: | Sun, 29 Apr 2012 16:59:54 +0000 |
| Subject: | com php-src: Fix test for proc_nice: bsd ps command didn't support option -o "%p %n": ex t/standard/tests/general_functions/proc_nice_basic.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68890@lists.php.net to get a copy of this message | ||
Commit: e52be10b30d3efd07ba705801b28ee5173b6fe2c
Author: reeze <reeze.xia@gmail.com> Mon, 30 Apr 2012 00:59:54 +0800
Parents: 381edb425e16bd5d472c84d757465aa42cb39d0f
Branches: PHP-5.3
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e52be10b30d3efd07ba705801b28ee5173b6fe2c
Log:
Fix test for proc_nice: bsd ps command didn't support option -o "%p %n"
Changed paths:
M ext/standard/tests/general_functions/proc_nice_basic.phpt
Diff:
diff --git a/ext/standard/tests/general_functions/proc_nice_basic.phpt
b/ext/standard/tests/general_functions/proc_nice_basic.phpt
index 3a95890..b64eab1 100644
--- a/ext/standard/tests/general_functions/proc_nice_basic.phpt
+++ b/ext/standard/tests/general_functions/proc_nice_basic.phpt
@@ -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];