TOM::lock
From Cyclone3 Wiki
Allows you to create indenpendent locks for running processes between system processes.
For example, when you are datamining data into database, statistic outputs would be inconsistent, therefore should this process be locked.
Examples
my $lock=new TOM::lock("datamining") || die "this lock is in use"; ... $lock->close();
get_pid()
Returns process ID number of process which is using the specified lock.
Syntax
my $pid=TOM::lock::get_pid("datamining");
get_pidfile()
Returns filename of this lock, containing actual process ID.
Syntax
my $pidfile=TOM::lock::get_pidfile("datamining");