summaryrefslogtreecommitdiffstats
path: root/pts-core/objects/pts_module.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-06-24 09:34:57 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-08-03 11:49:17 -0400
commitbfcca573aec06994093965c85d2d943b28d00b64 (patch)
tree30c7b31df39f166d0ffcf05ad94e9af3404d6ebc /pts-core/objects/pts_module.php
parent0cd79eeb85bd351583017e9aaa707f1fc07f6f48 (diff)
downloadphoronix-test-suite-upstream-bfcca573aec06994093965c85d2d943b28d00b64.tar.gz
phoronix-test-suite-upstream-bfcca573aec06994093965c85d2d943b28d00b64.tar.xz
phoronix-test-suite-upstream-bfcca573aec06994093965c85d2d943b28d00b64.zip
pts_Graph: Always show key/legend if it's a single-type line graph
pts_Graph: Use image antialiasing if it's available on the system pts_module: If pcntl isn't present, don't thread and warn the user
Diffstat (limited to 'pts-core/objects/pts_module.php')
-rw-r--r--pts-core/objects/pts_module.php31
1 files changed, 18 insertions, 13 deletions
diff --git a/pts-core/objects/pts_module.php b/pts-core/objects/pts_module.php
index 18a8a01..f897078 100644
--- a/pts-core/objects/pts_module.php
+++ b/pts-core/objects/pts_module.php
@@ -92,27 +92,32 @@ class pts_module
}
public static function pts_timed_function($time, $function)
{
- if($time < 5 || $time > 300)
+ if($time < 15 || $time > 300)
return;
- $pid = pcntl_fork();
-
- if($pid != -1)
+ if(function_exists("pcntl_fork"))
{
- if($pid)
- {
- return $pid;
- }
- else
+ $pid = pcntl_fork();
+
+ if($pid != -1)
{
- while(!defined("PTS_TESTING_DONE") && !defined("PTS_END_TIME") && pts_process_active("phoronix-test-suite"))
+ if($pid)
{
- eval(self::module_name() . "::" . $function . "();"); // TODO: This can be cleaned up once PHP 5.3.0+ is out there and adopted
- sleep($time);
+ return $pid;
+ }
+ else
+ {
+ while(!defined("PTS_TESTING_DONE") && !defined("PTS_END_TIME") && pts_process_active("phoronix-test-suite"))
+ {
+ eval(self::module_name() . "::" . $function . "();"); // TODO: This can be cleaned up once PHP 5.3.0+ is out there and adopted
+ sleep($time);
+ }
+ exit(0);
}
- exit(0);
}
}
+ else
+ echo pts_string_header("NOTICE: php-pcntl must be installed for the " . self::module_name() . " module.");
}
private static function module_name()
{