Commit fce0f762 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Check exit status of endexp. On error, leave things is a better state,

and send proper email status.
parent b6bca670
...@@ -412,6 +412,15 @@ sub endexp($) ...@@ -412,6 +412,15 @@ sub endexp($)
my(%exphash) = @_; my(%exphash) = @_;
system("$endexp -b $pid $eid"); system("$endexp -b $pid $eid");
my $exit_status = $? >> 8;
if ($exit_status) {
# TB admin is going to have to clean up.
fatal("Terminating Batch Mode experiment $pid/$eid");
DBQueryWarn("DELETE from batch_experiments ". DBQueryWarn("DELETE from batch_experiments ".
"WHERE eid='$eid' and pid='$pid'"); "WHERE eid='$eid' and pid='$pid'");
email_status("Batch Mode experiment $pid/$eid has finished!\n"); email_status("Batch Mode experiment $pid/$eid has finished!\n");
Supports Markdown
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