halldorr
01-13-2009, 02:06 PM
We're looking at ways to recover from server outages etc so we were looking at process IDs as a possibility. For example, we'd run a Perl script and get the process ID then store that in the database with the job.
What I'm not sure of is if Perl can be used to check if a process is running. For example, if I use $$ or $PID to get the process ID for a script and save it to the database.
I'd fire up a script later and see that the current row is being handled by process XXXX but I'd like to know if this process is still running. Is it possible with Perl to take the stored PID and see if it is still running?
What I'm not sure of is if Perl can be used to check if a process is running. For example, if I use $$ or $PID to get the process ID for a script and save it to the database.
I'd fire up a script later and see that the current row is being handled by process XXXX but I'd like to know if this process is still running. Is it possible with Perl to take the stored PID and see if it is still running?