You can set your own exit code in perl like this:
exit $exit_code;
So it's likely that the answer is in the perl code you are running.
Joost.
| [reply] [d/l] |
What I have is a Perl command in a Windows batch file which for some reason is failing with an exit code of 13. The Perl script itself can't exit with this number - there is no "exit 13" in my code - therefore it must be a problem with the Perl command itself.
A
| [reply] |
| [reply] [d/l] [select] |
If the exit code is an error return from a system call being passed through, it could mean ERROR_INVALID_DATA, but the only way to interprete that (maybe) is if you knew what syscall was returning it.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
| [reply] |
Turns out it's a 'permission denied error' : perl.exe can't open the perl script. I had the script run again and redirected both STDOUT and STDERR to a file and that's what it prints out.
It's funny there's no listing of these codes on the net somewhere...
Thanks for the help,
A
| [reply] |
Take a look at errno.h in your local C compiler include directory. 13 translates to EACCESS which marries up with your 'permission denied'.
From that I guess it is safe to assume that perl.exe uses the appropriate unix-style error code as exit values.
It would be nice if this was tagged in perlrun somewhere, but it probably the default expectation for unix tools and so doesn't rate a mention.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
| [reply] |