water has asked for the wisdom of the Perl Monks concerning the following question:
What's the best way for a program to insure that only a single instance of itself is running? I am thinking of following the apache-esque model, where the program writes its pid to a file:
Is this the right idiom?
Will I encounter permission issues on checking PIDs if the program is run from different users and groups?
Thanks for any advice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: only allow single instance of program running
by ccn (Vicar) on Aug 21, 2004 at 08:35 UTC | |
|
Re: only allow single instance of program running
by runrig (Abbot) on Aug 21, 2004 at 08:15 UTC | |
|
Re: only allow single instance of program running
by zentara (Cardinal) on Aug 21, 2004 at 12:54 UTC | |
|
Re: only allow single instance of program running
by Random_Walk (Prior) on Aug 21, 2004 at 21:50 UTC | |
|
Re: only allow single instance of program running
by ikegami (Patriarch) on Aug 22, 2004 at 00:23 UTC | |
by slloyd (Hermit) on Nov 10, 2005 at 23:01 UTC |