From: Dominik Vogt <dominik.vogt@gmx.de>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: trapping sigchld?
Date: Mon, 21 Jul 2003 15:00:48 +0200 [thread overview]
Message-ID: <20030721130048.GB8902@gmx.de> (raw)
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 ^_^ ^_^
reply other threads:[~2003-07-21 13:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030721130048.GB8902@gmx.de \
--to=dominik.vogt@gmx.de \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).