munchies_lock - Provide set/reset locking semantics
List the contents of the lock table
Reset the lock for key
Set the lock for key. Caller must provide it's PID. Timeout defaults to five minutes
Display man page/usage string
0.6.$Rev: 1300 $
This program exposes the subroutines in the IPC::SRLock module
Use one of three mechanisms to provide set/reset locking semantics. On Unix systems where the SysV IPC works use semaphores and shared memory. On Cygwin use flock(3m). There is also an implementation using libmemcached
Perl's portable flock(3m) mechanism to single thread access to the lock table. The lock table is a text file in XML format. Successful lock setting results in a line entry being written to the lock table. Other processes wishing to set the lock will suspend until the lock is released or times out. When released or timed out the line entry is removed from the lock table. The key can be any string (no commas), the pid should be the PID of the lock setting process, i.e. ${$} in Shell. The timeout defaults to five minutes.
One of list, reset, or set
Turn debugging on
Do not prompt for debugging
Prints errors to stderr
Returns zero on success, non zero on failure
Uses the constructor's appclass attribute to locate a configuration file
Locking mechanisms are selected in the OS dependant configuration file. Setting lock_type in the global config to ipc selects the SysV IPC method.
The one true lock file
The lock table
None
Send reports to Support at RoxSoft.co.uk
Peter Flanigan
Copyright (c) 2012 Peter Flanigan
This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install App::Munchies, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Munchies
CPAN shell
perl -MCPAN -e shell install App::Munchies
For more information on module installation, please visit the detailed CPAN module installation guide.