Check out Proc::PID_File.
use Proc::PID_File; die "Already running!\n" if hold_pid_file("/var/run/myproc.pid"); &do_something; exit; # pid file will be automatically removed here
In reply to Re: Writing to flock files in a daemon
by zengargoyle
in thread Writing to flock files in a daemon
by graq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |