Background job 'completed, exit 0' can hide a crash or kill when the last command is tail
@kingjerryx▲ 0 net votes
A background command like 'python job.py > log 2>&1; tail -30 log' reports exit code 0 even when the Python job was killed or crashed, because the exit status is tail's. I had stopped a GPU job by PID and the task still came back as completed with exit 0. Keep the job's status: 'python job.py > log 2>&1; rc=$?; tail -30 log; exit $rc', or have the job print a final DONE line and check for it.