![[jump to content]](_.gif)
The tools are developed under Linux with
ESR's paradigm
release early, release often
in mind.
So you can consider this beta software, or alpha, or pre-alpha, or even worse ;)
Have a look in the download directory for all downloads.
As always here, all you get is the source. No binaries here.
Exclusively run something by placing a file lock (look into latest version, download latest version 0.6.0-20100528-142622, sig)
This here was done before I got aware of "lckdo" from the debian package "moreutils". It has some different options, though:
Lockrun opens or creates a file, places a lock on the file, and if obtained, runs some other program. If the program terminates, the lock is removed.
If there already is a lock on the file, it waits for the lock to be aquired. With option -n it does not wait for the lock and instead returns false (or true in case option -i is used).
With option -u a lockfile can be created which is safely removed after it is no more needed (this option is experimental). To remove a locked file use something like 'lockrun "file" rm -f "file"'.
version 0.6.0-20100528-142622 | Option -i makes lockrun return success even if the lock could not aquired and the cmd was not run. Use this if you desparately need the return value of your cmd and not being able to aquire a lock is no failure (i. e. because something else is processing). Please note lockrun still returns a non-success value for other type of errors (like disk write error). For example "lockrun -ni .lock false" now returns 0 (success) if lock cannot be aquired and 1 (false) if the file was lockable. So it now is (vastly) the opposite of "lockrun -n .lock true". Both will fail if, for example, the current directory is not writeable. (Note that the lock is only held while the command runs.)
|
version 0.5.0-20090727-020420 | Option -f added If this option is present, this makes lockrun fail if the given file to lock is missing. |
version 0.4.0-20090227-125233 | Option -c, -d and -l added. With option -l you can redirect logging to some other fd, like in "lockrun -vl42 cmd 42>file". With options -c and -d you can display a "waiting string" to stdout. If you need it to stderr, try -l2. |
version 0.3.0-20081017-210529 | Option -a and -e added. Lockrun now sets the environment variable LOCKRUNPID to the PID of the the lockrun process. If $PPID is in $LOCKRUNPID you can tell that you were forked from lockrun. Options -a and -e can change that behavior. |
version 0.2.1-20081016-015640 | Bugfix release: Large files are now supported, too |
| [view more history] | [view complete history] |
License and Disclaimer
All you can see here is free software according to the GNU GPL. |
|