lcfglock - lock/unlock component semaphore
This documentation refers to lcfglock version 1.20.10
lcfglock [options] component
This command is used by LCFG components to prevent multiple simultaneous executions of component methods.
When used in conjunction with -u|--unlock this option forces the lock on the named component to be broken, even if it was owned by some other process.
Use directory dir for lock files.
Print debugging messages to stderr.
Lock operations return immediately with exit status 2 if the semaphore is busy rather than waiting. Note that the default behaviour is to wait forever.
Use pid as the process owning the semaphore. The default is is the process calling lcfglock
.
A message which should be inserted into the lock file when the lock is acquired. This is used by ngeneric to record the name of the component method being called.
Quiet mode. exit silently when attempting to release non-existent locks, or to take already existing locks.
Lock operations return immediately with exit status 2 if the semaphore is busy after waiting secs seconds. Note that the default behaviour is to wait forever.
Unlock (rather than lock) the semaphore.
Print messages when waiting for lock.
This option causes the usage documentation to be printed to the screen.
If there is a usage error this script will exit with a status of 254. If the lock or unlock command completes successfully the exit status will be zero. If there is an existing lock and no-blocking is requested or the timeout is exceeded the exit status will be 2. All other errors will result in an exit status of 1.
This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.
UbuntuFocal, EnterpriseLinux7
Please report any bugs or problems (or praise!) to bugs@lcfg.org, feedback and patches are also always very welcome.
Stephen Quinney <squinney@inf.ed.ac.uk>, Paul Anderson <dcspaul@inf.ed.ac.uk>
Copyright (C) 2001-2019 University of Edinburgh. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.