cvs: php-benchmarks /benchcli bench.php
| From: | Alexander Hjalmarsson | Date: | Mon, 06 Jul 2009 18:34:20 +0000 |
| Subject: | cvs: php-benchmarks /benchcli bench.php | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-65193@lists.php.net to get a copy of this message | ||
hjalle Mon Jul 6 18:34:20 2009 UTC
Modified files:
/php-benchmarks/benchcli bench.php
Log:
Edited so if the PHP process is spawned directly and not via a "sh -c .." command, it
will still work for the smapsparser.
http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/bench.php?r1=1.10&r2=1.11&diff_format=u
Index: php-benchmarks/benchcli/bench.php
diff -u php-benchmarks/benchcli/bench.php:1.10 php-benchmarks/benchcli/bench.php:1.11
--- php-benchmarks/benchcli/bench.php:1.10 Wed Jul 1 22:54:31 2009
+++ php-benchmarks/benchcli/bench.php Mon Jul 6 18:34:20 2009
@@ -25,7 +25,7 @@
*/
-error_reporting(E_ALL | E_NOTICE);
+error_reporting(E_ALL | E_STRICT);
set_time_limit(0);
/**
* This is the main class of the benchmark script
@@ -699,6 +699,9 @@
$status = proc_get_status($handle);
$ppid = $status["pid"];
$pids = preg_split("/\s+/", trim(
ps -o pid --no-heading --ppid
$ppid));
+ if ($pids[0] == 0) {
+ $pids[0] = $ppid;
+ }
return $pids;
}
/**