mutex?

Baruch Siach baruch at tkos.co.il
Thu Dec 2 11:11:15 UTC 2010


Hi David,

On Thu, Dec 02, 2010 at 10:59:00AM +0000, David Collier wrote:
> I have a .sh file which appends to the end of a log file. It is called
> from a number of different shells.
> 
> Clearly if I start 2 copies at once, there's a risk they will argue.
> 
> Is there any way to set up a mutex, so that only one copy can run at a
> time?
> 
> There's some c code that writes it, and that uses flock - can I share
> that lock?

flock(1)?

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -


More information about the busybox mailing list