TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: Wilfred van Velzen
from: andrew clarke
date: 2017-01-17 00:03:42
subject: bash script blocking multi toss

16 Jan 17 09:44, you wrote to Benny Pedersen:

 WV> Your model is wrong! The checking and creating of the lock file should
 WV> be one atomic operation!

 WV> So use:

 WV> if create bash-lock-file succeeds
 WV>   do hpt
 WV>   do htick
 WV>   delete bash-lock-file
 WV> else
 WV>   do nothing
 WV> endif

 WV> Most distributions have a command for that. For instance 'lockfile'.

FWIW, 'lockfile' is part of the procmail package:

"apt-get install procmail" in Debian/Ubuntu,

"pkg install procmail" in FreeBSD,

etc.

--- GoldED+/BSD 1.1.5-b20161221
* Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
SEEN-BY: 633/267 280 712/848
@PATH: 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.