check instace already running...

Fabio Pliger fabio.pliger at siavr.it
Sun Apr 10 10:10:31 EDT 2005


"Aldric L'Hernault" <aldric.lhernault at free.fr.net^W> ha scritto nel
messaggio news:42590357$0$28646$636a15ce at news.free.fr...
> Sidharth Kuruvila a écrit :
> > I haven't tested this. There is probably a better way of doing this
> > looking at process information. I use a lock file to mark that the
> > program is already running. The problem is that for an abrupt shutdown
> > the file might not be removed.
>
> To enhance your check, just write the PID into the file.
> On startup, if file exists, you may check that the process
> who has written it is still alive.
>
> Aldric L.


Yeah, but how can i retrieve my PID number?And how do i check if the process
who has written the file is still alive?If there a way to have the list of
the precesses running?






More information about the Python-list mailing list