OS independent way to check if a python app is running?

srid sridhar.ratna at gmail.com
Mon Dec 28 00:23:49 EST 2009


On Dec 14, 12:35 pm, MRAB <pyt... at mrabarnett.plus.com> wrote:
> pyt... at bdurham.com wrote:
> > Is there an os independent way to check if a python app is running?
>
> > Goal: I have a server program based on cherrypy that I only want to have
> > running once. If a system administrator accidentally attempts to run
> > this program more than once, I would like the 2nd instance of the
> > program to detect that its already running and exit.
>
> You could use lockfile:http://pypi.python.org/pypi/lockfile/0.7
>
> If a certain file exists and is locked, then the app is already running.

How is this different from the zc.lockfile package?
http://pypi.python.org/pypi/zc.lockfile/

-srid



More information about the Python-list mailing list