SPUG: Simple Perl daemon

Peter Darley pdarley at kinesis-cem.com
Tue Nov 19 12:21:21 CST 2002


Brian,
	That's what Cris Wilkes suggested.  I didn't know that such a thing
existed, but it looks like it should do the trick. :)  Thanks to you both.
Thanks,
Peter Darley

-----Original Message-----
From: Brian Hatch [mailto:spug at ifokr.org]
Sent: Tuesday, November 19, 2002 9:40 AM
To: Peter Darley
Cc: SPUG
Subject: Re: SPUG: Simple Perl daemon




> 	I'm writing a simple Perl daemon to detect changes in a database and run
> scripts depending on what it finds.  I'd like to have a second script that
> gets called periodically from a cron job to ensure that the daemon is
still
> running, but I'm not able to find any examples of how to do this.  Any
> suggestions?

Is this a unix box?  If so, rather than creating the
daemon watchdog, why not run the daemon from DJB's
supervise (http://cr.yp.to/daemontools.html), or
from init (/etc/inittab) directly?  Either will be
able to automatically restart it if it stops, and
then you don't need to write another program and
it'll check constantly, rather than when cron starts
it up.


--
Brian Hatch                  "Eyesssh"
   Systems and                -- Reegen, requesting ice,
   Security Engineer             after throwing a walking
http://www.ifokr.org/bri/        stick at dad.

Every message PGP signed


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list