in reply to die function and notifications
All interesting suggestions so far - but we found too many issues with setting up DIE signal handlers for us to trust it in production.
What we ended up doing, as we had a LOT of legacy stuff, some not written in Perl, was to write a Perl program we call 'run' and use this to execute ALL our stuff - a wrapper for all our processing.
The RUN program uses the open3() function to run the process as a child, and captures all STDOUT and STDERR as well as hooking its own STDIN into the child.
Yes - *NIX specific - havent had to do any large processing on NT
RUN checks exit status, signal and core flags of the child process, and sends us an email if the exit is non-zero
RUN is great for enforcing a standardised environment on the child processes - we never have issues running stuff on production because something in the environment or path is missing, not-found etc etc
RUN is also great for preventing cron output from generating unexpected mail - instead, if not running under a tty, it redirects all the output into log files in /var/log
Regards
Jeff
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: die function and notifications
by jaa (Friar) on May 22, 2003 at 15:26 UTC | |
|
Re: Re: die function and notifications
by demerphq (Chancellor) on May 22, 2003 at 16:51 UTC |