LCFG::Lock - Perl routines to lock/unlock component semaphore
This documentation refers to LCFG::Lock version 1.6.0
use LCFG::Lock
LCFG::Lock::Lock( component , options ... );
LCFG::Lock::Unlock( component , options ... );
LCFG::Lock::LockDir( [directory] );
Lock and Unlock are used by LCFG components to prevent multiple simultaneous executions of component methods. They return 'ok' on sucess or undef on error. LockDir sets and/or returns the directory used for lockfiles.
When used with Unlock, this option forces the lock on the named component to be broken, even if it was owned by some other process.
Print debugging messages to stderr.
Lock operations return immediately with exit value 'busy' if the semaphore is busy rather than waiting.
Use pid as the process owning the semaphore. The default is the parent process.
The time betwen polls when waiting for a lock to be released. Default is 1 sec.
Quiet mode. exit silently when attempting to release non-existent locks, or to take already existing locks.
Lock operations return after secs seconds with exit value 'busy' if the semaphore is still busy.
Print messages when waiting for lock.
Fedora13, Scientific5, Scientific6
Paul Anderson <dcspaul@inf.ed.ac.uk>
Copyright (c) University of Edinburgh
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Public License (version 2 or later).