------art_34929_22086478.1159542519843
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 9/29/06, ara.t.howard / noaa.gov <ara.t.howard / noaa.gov> wrote:
>
> On Fri, 29 Sep 2006, Francis Cianfrocca wrote:
>
> >
> > You say nothing about the coordination requirements of the external
> > processes with the "watchdog" process. Is your requirement really just
> to
> > ensure that four jobs are running at all times? If so, I would avoid
> using a
> > long-running watchdog process, because you're making an assumption that
> it
> > will never crash, catch a signal, etc. Why not run a cron job every five
> > minutes or so that checks the running processes (via pgrep or ps as you
> > suggested), starts more if necessary, writes status to syslog, and then
> > quits? Much, much easier.
> >
>
> this is exactly how rq works - except it does both:  the feeder process is
> a
> daemon, but one which refuses to start two copies of itself.  therefore a
> crontab entry can be used to make it 'immortal'.  basically, the crontab
> simply starts if it's not running, otherwise it does nothing.



 Sounds cool, Ara. How does it keep two copies of itself from running? Does
it flock a file in /var/run or something like that?

------art_34929_22086478.1159542519843--