Commit 3e9fe5ff authored by Leigh Stoller's avatar Leigh Stoller

Move END block to end of file so it runs before END blocks in included

modules.
parent cef494d5
......@@ -142,25 +142,6 @@ my $bsname;
my $origin_uuid;
my $webtask;
#
# We need an END block to make sure the web task is set.
#
END {
my $saved_exitcode = $?;
# Watch for abnormal termination.
if ($? && defined($webtask)) {
# Cause of the fork in run_with_ssh.
$webtask->Refresh();
if (!$webtask->HasExited()) {
$webtask->status("failed");
$webtask->imagesize(0);
$webtask->Exited(-1);
}
}
$? = $saved_exitcode;
}
#
# Configure variables
#
......@@ -1803,3 +1784,22 @@ sub run_with_ssh($$)
return $stat;
}
#
# We need an END block to make sure the web task is set.
#
END {
my $saved_exitcode = $?;
# Watch for abnormal termination.
if ($? && defined($webtask)) {
# Cause of the fork in run_with_ssh.
$webtask->Refresh();
if (!$webtask->HasExited()) {
$webtask->status("failed");
$webtask->imagesize(0);
$webtask->Exited(-1);
}
}
$? = $saved_exitcode;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment