bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with "wait" builtin not waiting for jobs spawned after the wait


From: Christo Kutrovsky
Subject: Problem with "wait" builtin not waiting for jobs spawned after the wait command
Date: Fri, 21 May 2004 16:42:41 -0400

Hello,
 
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_V\
ENDOR='pc' -DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -march=i386 -mcpu=i686
uname output: Linux zeus 2.4.21-15.ELsmp #1 SMP Sun May 16 01:48:39 EDT 2004 i686 i686 i386 GNU/Linux
Machine Type: i686-pc-linux-gnu
 
Bash Version: 2.05b
Patch Level: 0
Release Status: release
 
Description:
See attached script (mgz -help)
 
I am using signals, "trap", and "wait" to control a given number of threads in the background. Initially I setup signals handlers that trap SIGUSR2 and execute a new thread, then I execute the number of threads given, and I wait for the threads in the background to complete with the "wait" command. In previous versions - "GNU bash, version 2.05.8(1)-release (i386-redhat-linux-gnu)" this script works just fine, as "wait" is waiting for all background jobs, including the ones started *after* the wait command started waiting. However in the latest release "wait" only waits for the jobs started before the wait command, and the ones started after are not waited on.
 
Repeat-By:
You can use this to test correct function of the script:
mgz 'sp=$(($RANDOM%10)); sleep $sp; echo File "[$tfile]" slept $sp' 2 file1 file2 file3 file4 file5 file6 file7 file8 file9
 
Regards,
Christo Kutrovsky
Database/System Administrator
The Pythian Group
(613) 565-8696 x233
(877) 798-4426 x233
Cell:

Attachment: mgz
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]