Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by Ryszard (Priest)
on Dec 03, 2002 at 20:37 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-16 14:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found