[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there any mutex/semaphore mechanism in shell scripts?
From: |
Andreas Schwab |
Subject: |
Re: Is there any mutex/semaphore mechanism in shell scripts? |
Date: |
Thu, 21 May 2009 16:57:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) |
jjjaime <jjjaime@gmail.com> writes:
> So, to speed up the execution of the script, I want FUNCTION_1 and
> FUNCTION_2 in parallel. But the script fails when FUNCTION_2 ends before
> FUNCTION_1.
>
> Is there any mechanism for synchronization (i.e. semaphores/mutes) or any
> other suggestion for simulating it?
FUNCTION_1 &
FUNCTION_2
wait
FUNCTION_3
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."