Check out Proc::Watchdog. Each process writes the current time to a file every so often. Another process checks the files every so often and if the time within isn't recent enough (process wedged/gone) it will alarm/restart/whatever. It might suit your needs. You can also try kill 0 $pid.
If SIGNAL is zero, no signal is sent to the process. This is a useful way to check that the process is alive and hasn't changed its UID. See the perlport manpage for notes on the portability of this construct.
In reply to Re: Best way to ensure process is live
by zengargoyle
in thread Best way to ensure process is live
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |