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

Fix minor bug; was losing the exit status of the parser, so wrapper

was not properly kicking the NS file back to the user.
parent 861dcadd
...@@ -165,12 +165,13 @@ if (! $pid) { ...@@ -165,12 +165,13 @@ if (! $pid) {
# Parent waits. # Parent waits.
# #
waitpid($pid, 0); waitpid($pid, 0);
my $exit_status = $? >> 8;
# #
# If the child was KILLed, then it overran its time limit. # If the child was KILLed, then it overran its time limit.
# Send email. Otherwise, exit with result of child. # Send email. Otherwise, exit with result of child.
# #
if (($? >> 8) == SIGKILL) { if ($exit_status == SIGKILL) {
my $msg = "Parser Exceeded CPU Limit"; my $msg = "Parser Exceeded CPU Limit";
SENDMAIL($TBOPS, "Parser Exceeded CPU Limit", $msg, SENDMAIL($TBOPS, "Parser Exceeded CPU Limit", $msg,
...@@ -185,4 +186,5 @@ if (($? >> 8) == SIGKILL) { ...@@ -185,4 +186,5 @@ if (($? >> 8) == SIGKILL) {
if (-d $tempdir) { if (-d $tempdir) {
system("/bin/rm -r $tempdir"); system("/bin/rm -r $tempdir");
} }
exit($? >> 8); exit($exit_status);
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