good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
LanX ++
There are many ways to ensure single instance of perl program is running. PID files are the traditional way to do it. we can also hold a lock on a file,for example the program itself. This small piece of code will do the trick:
One advantage over PID files is that files automatically get unlocked when the program exits. It is much easier to implement in a reliable way. All is well In reply to Re: Check for another running instance of the same program
by vinoth.ree
|
|