wube has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks.
How does one test whether a daemon is up and running ??
My code follows :
The snippet is in a script called " testd.pl" . The problem is that this code finds itself running and always exits. What I really want to do is to see if a previous invocation is still active ?? Any advice will me much appreciated. TIAmy $rc_testd = grep /testd/ , ( `ps -ef` ) ; if ($rc_testd > 0) { print "testd daemon is up and running \n" ; exit 1 ; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to verify if a daemon is up and running ?
by rob_au (Abbot) on Dec 03, 2002 at 20:53 UTC | |
Re: How to verify if a daemon is up and running ?
by Ryszard (Priest) on Dec 03, 2002 at 20:37 UTC | |
Re: How to verify if a daemon is up and running ?
by ehdonhon (Curate) on Dec 04, 2002 at 03:49 UTC | |
Re: How to verify if a daemon is up and running ?
by Monky Python (Scribe) on Dec 04, 2002 at 09:03 UTC | |
Re: How to verify if a daemon is up and running ?
by iburrell (Chaplain) on Dec 04, 2002 at 01:49 UTC |
Back to
Seekers of Perl Wisdom