Why does my Perl script exit with 137?

Bi. picture Bi. · Jun 24, 2009 · Viewed 59.2k times · Source

Is there a way to eliminate a warning (exit code 137) in perl? I am running a Perl script on linux within another shell script. This Perl script exits with a warning and exit code 137. I could not pinpoint what exit code 137 stands for.

What is the best way to avoid this warning? I tried "no warnings" in the script and I have an exit 0 at the end of my Perl script as well.

Answer

Igor Krivokon picture Igor Krivokon · Jun 25, 2009

137=128+9, which means some other process has sent you a signal 9, which is SIGKILL. I.e. the other script kills yours, that's what it looks like.