[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is there any mutex/semaphore mechanism in shell scripts?
From: |
jjjaime |
Subject: |
Is there any mutex/semaphore mechanism in shell scripts? |
Date: |
Wed, 20 May 2009 12:34:42 -0700 (PDT) |
I would like to execute some functions in parallel, but the last method has
to wait until the first 2 functions have finished.
The script is:
FUNCTION_1() {
...
}
FUNCTION_2() {
...
}
FUNCTION_3() {
...
}
FUNCTION_1 &
FUNCTION_2
FUNCTION_3
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?
Thanks in advance,
Jaime
--
View this message in context:
http://www.nabble.com/Is-there-any-mutex-semaphore-mechanism-in-shell-scripts--tp23641994p23641994.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.
- Is there any mutex/semaphore mechanism in shell scripts?,
jjjaime <=