|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: Perl watcher daemonby Crackers2 (Vicar) |
| on Jan 18, 2012 at 22:27 UTC ( #948636=note: print w/ replies, xml ) | Need Help?? |
|
I don't think that's doing what you think it does. As far as I can tell the bare $repeater doesn't do anything. You probably want something like
Also, Proc::Background has functions for checking whether or not the process is still running, so you may want to use those instead of shelling out to pgrep:
Of course that would not detect a process that was already started when your watcher begins. (But in that case you'd currently have 2 running processes anyway since you unconditionally start one with the initial Proc::Background->new call.)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||