Commit 1080662b authored by Mac Newbold's avatar Mac Newbold
Browse files

Add save/restore of exit status in end block, to resolve the oddity Rob found.

parent af95e664
......@@ -919,6 +919,7 @@ sub cleanup {
# This gets called if we die of 'natural causes' (exit, die, etc.)
END {
my $stat = $?;
if (defined($lockfile) && $lockfile ne "") {
unlink $lockfile;
announce("Stated exiting, cleaning up\n");
......@@ -933,5 +934,7 @@ END {
die "Unable to unregister with event system\n";
}
}
# Restore $? in case one of the things I called changed it
$? = $stat;
}
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