[Tutor] how to know if process is running?

shawn bright shawn at skrite.net
Tue Jul 28 19:32:51 CEST 2009


Hey all, i used the popen with getpid() option.
working well so far, thanks to all of you.
shawn

On Tue, Jul 28, 2009 at 12:11 PM, Mac Ryan<quasipedia at gmail.com> wrote:
> I am not an expert, but if I got you correctly, what you want to achieve
> is a "singleton": http://en.wikipedia.org/wiki/Singleton_pattern if you
> watch at the sample implementation, there is a Python example too.
>
> Mac.
>
> On Tue, 2009-07-28 at 10:45 -0500, shawn bright wrote:
>> Hey all,
>>
>> I have an app that runs in a GUI written in pygtk. It spawns several
>> threads, and runs all the time.
>> It is mission critical that we can never have two instances of this
>> running at once.
>>
>> So, my question is, how can i write something that will know if there
>> is an instance of that something already running?
>>
>> I am doing this in python 2.5 on Ubuntu, if that matters ( which i
>> suspect it does ).
>>
>> thanks,
>> shawn
>> _______________________________________________
>> Tutor maillist  -  Tutor at python.org
>> http://mail.python.org/mailman/listinfo/tutor
>
>


More information about the Tutor mailing list