summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEudyptula <eitan@mosenkis.net>2009-07-21 18:32:55 -0400
committerEudyptula <eitan@mosenkis.net>2009-07-21 18:32:55 -0400
commitd9e451fc01041dcbbc7558325c52783abf0efadd (patch)
treefb4e11774286c18da57ccc4130af2d466cced94f /backend/functions/execution.php
parentAdded bkisofs ISO manipulation library and wrote CLI wrapper for it (diff)
downloadingenue-d9e451fc01041dcbbc7558325c52783abf0efadd.tar.gz
ingenue-d9e451fc01041dcbbc7558325c52783abf0efadd.tar.bz2
ingenue-d9e451fc01041dcbbc7558325c52783abf0efadd.zip
Integrated bkisofs-cli into livecd and installcd bundlers, fixed various things in bkisofs-cli and the backend
Diffstat (limited to 'backend/functions/execution.php')
-rw-r--r--backend/functions/execution.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/backend/functions/execution.php b/backend/functions/execution.php
index 0aee4d6..f35e8c9 100644
--- a/backend/functions/execution.php
+++ b/backend/functions/execution.php
@@ -33,7 +33,7 @@ function execute_command_with_all($description, $command, $fatal=true, $path=nul
$env=is_array($env)?array_merge($default_env, $env):$default_env;
$task=new sql_task($build->id, task_get_order(), 'exec', $description, $command);
$result=$task->execute($path, $env);
- unset($task);
+ unset($GLOBALS['task']);
if ($result != 0 && $fatal) {
if ($result > 0)
throw_exception($command.' returned with exit status '.$result);
@@ -68,10 +68,12 @@ function start_internal_task($desc) {
function end_internal_task($status=0) {
global $task;
if (isset($task)) {
- $task->finish=time();
- $task->exit=$status;
+ if (!isset($task->finish))
+ $task->finish=time();
+ if (!isset($task->exit))
+ $task->exit=$status;
$task->write();
- unset($task);
+ unset($GLOBALS['task']);
}
}
function log_msg($msg, $nl=true) {