bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: Can bash provide some mechanism for locking/unlocki


From: Bob Proulx
Subject: Re: Feature request: Can bash provide some mechanism for locking/unlocking?
Date: Thu, 15 Apr 2010 10:57:28 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

Eric Blake wrote:
> Clark J. Wang wrote:
> > In C code I can use lockf(), flock(), semaphore and mutex for locking /
> > unlocking. Can bash provide some similar mechanisms?
> 
> man 1 flock
> 
> If necessary, you may need to install:
> ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/

There is also 'lockfile' distributed with 'procmail'.

  http://www.procmail.org/

I tend to use 'mkdir' when I need a semaphore in a shell script.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]