A new version of my 'getlock' locking program is out. I use this to ensure that scripts and programs running out of 'cron' don't start running multiple copies that 'fight' each other. getlock creates a lock file and locks it with fcntrl locking, and then runs the program or script, keeping the file locked for the whole time that program runs. The advantage of this scheme over other locking programs is that if the 'getlock' process is killed or otherwise stops the lock is released automatically.
'getlock' has all sorts of 'timeout' features regarding how long it waits for a lock, and whether it 'steals' a lock from a program that's currently holding it, etc, etc.
The new version has the added feature of an 'abandon timeout', this is a timeout that applies to the running program. If the program has 'frozen' for some reason, then the 'abandon timeout' can be used so that getlock can detect the program is taking too long, and kill it off and exit. I use this, for instance, in situations where a script or program connects to hosts or websites that might become unresponsive, leaving the program waiting for network data that will never come. This can result in a 'hung' program that's holding the lock file and preventing another instance of the process (which will reconnect and start from scratch, and may thus succeed) from starting up.
Get it here:
http://sites.google.com/site/columscode/files/getlock-0.2.tar.gz?attredirects=0
Subscribe to:
Post Comments (Atom)
Dewacintaqq
ReplyDeleteDewacinta
Halototo
Dominohalo
Papadomino
Delimapoker
link Dewacintaqq
Daftar Dewacintaqq
Dewacintaqq
Dominohalo
Papadomino
Delimapoker
agen poker idn terpercaya
Poker Indonesia
Poker Online Indonesia
Agen Ceme Online
Daftar Situs Poker
Poker Online Terpercaya
Judi Poker
Poker Online Uang Asli
Poker Uang Asli
Situs Poker Online
Agen Poker
Capsa Susun Online
DewacintaQQ Situs Poker Online Indonesia
Agen Judi Online seperti Poker Online
Situs Judi Online Terpercaya
bandar poker
situs judi
poker online
ceme online
bandar ceme
situs poker
bandar judi
poker idn
judi poker
judi online
agen judi
bandar judi
poker idn
agen poker
idn poker
Situs Judi Poker Online
DominoQQ IDN POKER
bandarqq dan dominoqq terpercaya
Agen judi kartu deposit uang asli pkv games
Agen Poker Online Indonesia Terpercaya