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