[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
backgrounded children forgotten
From: |
Aron Griffis |
Subject: |
backgrounded children forgotten |
Date: |
Sat, 10 Dec 2005 23:36:36 -0500 |
User-agent: |
Mutt/1.5.11 |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: x86_64-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -march=nocona -O3 -pipe
-fomit-frame-pointer
uname output: Linux vino 2.6.15-rc1 #1 SMP PREEMPT Thu Nov 17 10:10:29 EST 2005
x86_64 Intel(R) Xeon(TM) CPU 3.20GHz GenuineIntel GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 3.0
Patch Level: 16
Release Status: release
Description:
When 2 processes are backgrounded inside $(...), bash forgets the first
one was a child of the shell.
Repeat-By:
Note this needs to be a script, not cmdline, otherwise $! doesn't work.
$ cat demo
output=$(
true &
pid=$!
true &
sleep 1
wait $pid
)
$ bash demo
demo: line 13: wait: pid 25183 is not a child of this shell
- backgrounded children forgotten,
Aron Griffis <=