SPUG: Simple Perl daemon

Brian Hatch spug at ifokr.org
Tue Nov 19 11:39:53 CST 2002

> 	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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
Url : http://mail.pm.org/archives/spug-list/attachments/20021119/97ab2bb6/attachment.bin

More information about the spug-list mailing list