http://www.perlmonks.org?node_id=818402

petr999 has asked for the wisdom of the Perl Monks concerning the following question:

Hello,
I have the fork()ed application which I believe to execute the native Perl code only.
It reports that forks are exiting with codes 512 and 2304 and doesn't if they exit(0) normally.
I'd like to know what do those codes mean. The only thing I notice is: exit after loop.
my STDERR looks detached and I should like to investigate the exit code first. It is reported spontaneously by FCGI::ProcManager, so the only STDERR I can see is in the FastCGI requester logs. There are unsignificant warnings there like the one I mentioned and undefined variable, too.
I expect this to be the memory insufficience: I limited the memory hardly and enhanced the comsumption a bit recently, so I even don't expect a human-readable thing out there.
I tried to grep perl sources for 2304 and had no luck of that.
UPDATE. I have the *CORE::GLOBAL::exit redefined in the BEGIN{} of the main package and after I changed things about variable undeclared, I see it's 65280 now which is CORE::exit(255). Should I seek for that on the code included in %INC? But I consider this inconvinient that I can't google out by those numbers. I think it's reasonable to assume the exit codes reported by the daemon to the console are the shell-explainable. Anyway, if Perl process exits with a non-zero status and the value depends on the runtime error like "label not found" there should be a hash constant defined anywhere to be a human-readable explanation for that, just why not?
Thank you.
Peter Vereshagin peter@vereshagin.org http://vereshagin.org