To force cleanup, even on error, you could write your own die handler tat cleans up after itself.
This is a step in the right direction, but unfortunately, this won't be invoked if your process is kill -9'd, or if the host is powered off abruptly, which is why the "check the PID to see if it's running" logic is still useful.
In reply to Re: Re: Make a perl script self aware...
by simonm
in thread Make a perl script self aware...
by neuroball
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |