|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: how to exit if tool is already runningby sflitman (Hermit) |
| on Aug 12, 2010 at 05:58 UTC ( #854586=note: print w/ replies, xml ) | Need Help?? |
|
Check out the excellent CPAN module Sys::RunAlone, it should help fix this problem. It cleverly locks your scripts DATA handle to prevent another invocation of the same script doing so. It's cross-Unix, but you'd need something fancier on Windows.
HTH,
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||