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...
In reply to Re: How to verify if a daemon is up and running ?
by Ryszard
in thread How to verify if a daemon is up and running ?
by wube
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |