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

Documenting exit codes

Thread Next
From:
Matt Sergeant
Date:
May 31, 2002 05:41
Subject:
Documenting exit codes
Message ID:
Pine.LNX.4.44L.0205311339160.18986-100000@ted.sergeant.org
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
welcome.

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

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


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About