in reply to How to verify if a daemon is up and running ?
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...
|
|---|