TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: andrew clarke
from: Wilfred van Velzen
date: 2017-01-16 14:22:46
subject: Re: bash script blocking multi toss

Hi andrew,

On 2017-01-17 00:03:42, you wrote to me:

 WV>> Your model is wrong! The checking and creating of the lock file
 WV>> should 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'.

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

Indeed. Also true for (open)SUSE ...

Bye, Wilfred.

--- FMail-W32 1.73.12.64-B20170112
* Origin: FMail development HQ (2:280/464)
SEEN-BY: 3/50 103/705 154/10 203/0 227/51 230/0 240/1661 5832 249/303 261/38
SEEN-BY: 280/464 5003 292/854 310/31 423/120 633/267 280 640/384 712/550 848
SEEN-BY: 770/1 2320/100 5075/35
@PATH: 280/464 712/848 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™.