Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
trapping sigchld?
- X-seq: zsh-users 6401
- From: Dominik Vogt <dominik.vogt@xxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: trapping sigchld?
- Date: Mon, 21 Jul 2003 15:00:48 +0200
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Reply-to: dominik.vogt@xxxxxx
I am confused by the way zsh traps signals. I want to catch a
SIGCHLD in a script:
-------------- snip -------------
#!/usr/bin/zsh
sigchild_handler () {
echo got SIGCHLD
running=0
}
# SIGCHLD == 17 on Linux
trap sigchld_handler 17
# run background job
running=1
sleep 30 &
while [ $running = 1 ]; do
echo -n .
sleep 1
done
-------------- snip -------------
When the background job completes, the sigchild handler is called
as expected. But if I send a SIGCHLD manually, it is ignored:
$ killall -17 zsh
This works fine with other signals. Is it a bug, a feature, or am
I doing something wrong?
Bye
Dominik ^_^ ^_^
Messages sorted by:
Reverse Date,
Date,
Thread,
Author