On Wed, Mar 18, 2009 at 6:29 PM, John Matthews <[email protected]> wrote:
>> mutexes are used on Unix-ish systems, too, although it's easy enough
>> to iterate across the process list even with a shell script.
>
> Never tried it, but is there a danger with the process list approach (Windows
> or Unix) that if 2 processes are started at roughly the same time, you still
> end up with 2 running?
Probably!
A bad program masquerading as the one you are trying to start could
also cause an issue with just checking the process list and prevent
the real one from starting (like, say, a service that is run at
startup).
Really, there are valid reasons to use both methods. I think it
depends on the needs of your program.
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi