Date: 25 Apr 1998 15:12:33 -0400 From: Kevin Street <street@iName.com> To: Karl Pielorz <kpielorz@tdx.co.uk> Cc: questions@FreeBSD.ORG Subject: Re: Protecting Shell scripts from deadlocks... Message-ID: <87zph990m6.fsf@kstreet.interlog.com> In-Reply-To: Karl Pielorz's message of "Sat, 25 Apr 1998 19:42:30 %2B0100" References: <35422E96.AFE7E766@tdx.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Karl Pielorz <kpielorz@tdx.co.uk> writes: > There must be a better way of doing this in scripts? - Theres always the > chance another instance might start between me checking the lock file - and > creating the lock file... > > If there is no better way of doing this - I don't mind converting the whole > script to 'C' - in which case I presum 'man flock' is a good place to start? There's a little utility called lockfile which is distributed as part of procmail that can help with this. It has timeouts and retries and lock forcing options that are handy. -- Kevin Street street@iName.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87zph990m6.fsf>