[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: Can bash provide some mechanism for locking/unlock
From: |
Clark J. Wang |
Subject: |
Re: Feature request: Can bash provide some mechanism for locking/unlocking? |
Date: |
Fri, 16 Apr 2010 09:31:05 +0800 |
Yes, flock(1) can do the right job but personally I don't like the way a
command is invoked by flock. :)
And flock can only run external commands, it cannot do with things like bash
builtins or functions.
On Fri, Apr 16, 2010 at 12:04 AM, Eric Blake <eblake@redhat.com> wrote:
> On 04/15/2010 08:28 AM, 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/
>
> --
> Eric Blake eblake@redhat.com +1-801-349-2682
> Libvirt virtualization library http://libvirt.org
>
>
Re: Feature request: Can bash provide some mechanism for locking/unlocking?, Jan Schampera, 2010/04/15