Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to verify if a daemon is up and running ?

by Ryszard (Priest)
on Dec 03, 2002 at 20:37 UTC ( #217341=note: print w/replies, xml ) Need Help??


in reply to How to verify if a daemon is up and running ?

The decent method for you to do this is to create a lock file...

On startup your prgy would read in a pid, and do a grep in the process list for that pid (and perhaps the name of your prgy ( to prevent collisions with reused pids)). If it finds the pid, it exits, if not, it continues and writes out its own pid ($$).

This is a pretty standard method to prevent dupe processes...

  • Comment on Re: How to verify if a daemon is up and running ?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://217341]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2022-08-09 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?