Commit 1ceec998 authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

Better detection of the process being killed

parent 7f7a75cd
......@@ -128,15 +128,17 @@ sub write_output {
my $stderr = $self->param('stderr');
my $flat_cmd = $self->param('flat_cmd');
if ($return_value and not ($return_value >> 8)) {
# The job has been killed. The best is to wait a bit that LSF kills
# Lower 8 bits indicate the process has been killed and did not complete.
if ($return_value & 255) {
# It can happen because of a MEMLIMIT / RUNLIMIT, which we
# know are not atomic. The best is to wait a bit that LSF kills
# the worker too
sleep 30;
# If we reach this point, perhaps it was killed by a user
# If we reach this point, it was killed for another reason.
die sprintf( "'%s' was killed with code=%d\nstderr is: %s\n", $flat_cmd, $return_value, $stderr);
} elsif ($return_value) {
# "Normal" process exit with a non-zero code
# "Normal" process exit with a non-zero code (in the upper 8 bits)
$return_value >>= 8;
# We create a dataflow event depending on the exit code of the process.
......
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