SIGCHLD in bash



I'd like to catch SIGCHLD in bash. According to the man page, it looks
like it should be possible, but the following pgm takes just about any
signal but 17: SIGCHLD. I'm running SuSE 10.3 from home. At work, I
also can't get it to work with kubuntu. Does anybody know why the man
page is wrong (seemingly).

sig=1
while [ $sig -lt 30 ]; do
trap "echo got $sig" $sig
((sig=$sig+1))
done

trap

#(sleep 2; /bin/pwd)&
#/bin/pwd

echo ${1:-"undefined"}

/bin/kill -${1:-1} $$

sleep 3

echo done
.



Relevant Pages