Hi Daniel,

I had the following code. I hope it would help.

# Before your while loop:
#-------------------------------------------------------
open (PID, $pidfile) || die "Cannot $pidfile: $!\n";
while ( $pid = <PID> ) {
        system "kill -9 $pid";
}
close (PID);
open (PID, ">$pidfile") || die "Cannot $pidfile: $!\n";
print PID "$$\n" if (!$stop);
close PID;
exit (0) if ($stop);
#-------------------------------------------------------

Regards,


Daniel Falkenberg wrote:

> Hi All,
> 
> I have a daemon here that runs in a while loop.  I was just wondering if
> it is possible to restart a perl daemon instead of doing the
> following...
> 
> %killall name_of_perl_daemon.pl
> 
> How would I go about doing something like...
> 
> service name_of_perl_daemon.pl restart
> 
> Can I do this with perl...?
> 
> Dan
> 
> ==============================
> VINTEK CONSULTING PTY LTD
> (ACN 088 825 209)
> Email:  [EMAIL PROTECTED]
> WWW:    http://www.vintek.net
> Tel:    (08) 8523 5035
> Fax:    (08) 8523 2104
> Snail:  P.O. Box 312
>         Gawler   SA   5118
> rm -rf /bin/laden
> ==============================

-- 
Ahmed
[EMAIL PROTECTED] | http://arbornet.org/~ahmed


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to