* trapping sigchld?
@ 2003-07-21 13:00 Dominik Vogt
0 siblings, 0 replies; only message in thread
From: Dominik Vogt @ 2003-07-21 13:00 UTC (permalink / raw)
To: Zsh Users
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 ^_^ ^_^
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-07-21 13:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 13:00 trapping sigchld? Dominik Vogt
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).