%expand%
use File::Pid;
my $pf = File::Pid->new;
exit(0) if $pf->running;
$pf->write();
END {$pf->remove();}
| Bracing against the wind | |
| www.documentroot.com |
|
Sunday, December 05, 2010
Perl don't run this script more than once
The IPC and mutex stuff is cute, but not portable... or transparent. Plus, it's nice to have a pidfile out there for other reasons. (When I forget how I solved a problem, I post it here. That way, I can google and get an answer.) [View/Post Comments] [Digg] [Del.icio.us] [Stumble] |
|
Bloghop:
|
Blogarama
|
Technorati
|
Blogwise