develooper Front page | perl.perl5.porters | Postings from May 2002

Documenting exit codes

Thread Next
Matt Sergeant
May 31, 2002 05:41
Documenting exit codes
Message ID:
In order to be able to rely on exit codes from programs it seems to me
that it's important to know if a particular exit code might come from core
perl, or if it comes from your program. I know that's going to be mostly
impossible, but it would be nice to at least be able to document the known
return codes that perl gives.

So far I can see that it returns 2 if it exits because it couldn't find a
module, and 255 (or -1) if it exited with error for some other reason
(exception, syntax error, etc). I can see places in the core where it
looks like it's trying to exit with 1, but I can't seem to get that to
happen (yet), so any pointers as to how you could invoke that would be

If there are no other "known" exit codes, would this be worth a patch to

<!-- Matt -->
<:->Get a smart net</:->

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About