SIGCHLD in bash
- From: Charles T Smith <cts.private@xxxxxxxxx>
- Date: Mon, 14 Jan 2008 20:52:46 +0000 (UTC)
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
.
- Follow-Ups:
- Re: SIGCHLD in bash
- From: Kaz Kylheku
- Re: SIGCHLD in bash
- From: Barry Margolin
- Re: SIGCHLD in bash
- Prev by Date: How to filter a .csv file based on the integer value in one specific field (per record)
- Next by Date: Re: creating arrays from text files
- Previous by thread: How to filter a .csv file based on the integer value in one specific field (per record)
- Next by thread: Re: SIGCHLD in bash
- Index(es):
Relevant Pages
|