[CentralOH] SingleInstance Recipe (Windows)

Mark Erbaugh mark at microenh.com
Wed Aug 4 03:43:46 CEST 2010

On Aug 3, 2010, at 9:04 PM, m g wrote:

> For a simple solution on a UNIX box, I would write the process id to,
> or at least touch, /var/run/myapp.pid.  If the pid file already
> exists, I know that the application is already running.  Of course,
> the possibility exists that something happened to the application, and
> it was not able to remove the pid file.... just delete the pid file if
> you are sure its not running: ps ax | grep $(cat /var/run/myapp.pid)

I ran into a problem using /var/run/.pid. On both my Mac and Ubuntu, the user doesn't have write access to this directory.


More information about the CentralOH mailing list