Hello,
because of the following lines:
grep -n FILE build/bash-4.0/externs.h
200:extern int fpurge __P((FILE *stream));
264:extern int sh_setlinebuf __P((FILE *));
bash-4.0/externs.h
needs
#include
- this was discovered while building under latest officially released
CYGWIN.
Under Linux it
2009/4/11 Chet Ramey :
> Piotr Zielinski wrote:
>> Configuration Information [Automatically generated, do not change]:
>> Machine: i486
>> OS: linux-gnu
>> Compiler: gcc
>> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
>> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
Piotr Zielinski wrote:
>> Thanks for the report. The problem is that bash doesn't always set
>> $? before testing whether or not the shell should exit because -e has
>> been set and an unset variable is being expanded.
>
> Thanks for the reply. Does it mean it is a bug or a feature?
It's a bug
This reference was very interesting for my purposes.
http://mywiki.wooledge.org/ProcessManagement#advanced
I can achieve it with:
jobpid=$!
and
wait $jobpid
--
View this message in context:
http://www.nabble.com/Is-there-any-mutex-semaphore-mechanism-in-shell-scripts--tp23641994p23658836.html
On Wednesday 20 May 2009 21:34, jjjaime wrote:
>
> 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
jjjaime 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?
FUNCTI
On Wed, May 20, 2009 at 12:34:42PM -0700, jjjaime wrote:
> 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.
Why?
> Is there any mechanism for sync
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 FUN
Hi!
I have found a discrepancy between documentation (man page) and
behavior of Bash under -e switch. In documentation it is written:
The shell does not exit if the command that fails is part of the
command list immediately following a while or until keyword, part of
the test in an if statement,