[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: Can bash provide some mechanism for locking/unlocki
From: |
Jan Schampera |
Subject: |
Re: Feature request: Can bash provide some mechanism for locking/unlocking? |
Date: |
Thu, 15 Apr 2010 18:04:26 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.24 (X11/20100329) |
Clark J. Wang schrieb:
> In C code I can use lockf(), flock(), semaphore and mutex for locking /
> unlocking. Can bash provide some similar mechanisms?
>
For simple things, which don't need to be 1000% rocksolid, you can use
atomic operations like mkdir or noclobbered redirection for mutex purposes.
Accessing the file locking mechanisms of the kernel isn't possible so
far, but Bash has a plugin framework.
Jan
Re: Feature request: Can bash provide some mechanism for locking/unlocking?,
Jan Schampera <=