Search code examples
javaperlexecexit-code

What does the status code of the perl interpreter mean?


I'm trying to execute a copy of the Perl interpreter using Java's Runtime.exec(). However, it returned error code 9. After running the file a few times, the perl interpreter mysteriously started to return code 253 with no changes in my command at all.

What does code 253 / code 9 mean? A Google search for perl interpreter's exit codes turned up nothing. Where can I find a list of exit codes for the Perl interpreter?


Solution

  • See perldoc perlrun:

    If the program is syntactically correct, it is executed. If the program runs off the end without hitting an exit() or die() operator, an implicit exit(0) is provided to indicate successful completion.

    Thus, the program you are running must be somehow specifying those exit values via die, exit or equivalent.