From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5058 invoked from network); 21 Jul 2003 13:14:44 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 Jul 2003 13:14:44 -0000 Received: (qmail 6053 invoked by alias); 21 Jul 2003 13:14:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6401 Received: (qmail 27992 invoked from network); 21 Jul 2003 12:59:19 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 21 Jul 2003 12:59:19 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.227.126.204] by sunsite.dk (MessageWall 1.0.8) with SMTP; 21 Jul 2003 12:59:19 -0000 Received: from [172.17.36.7] (helo=erdbeere.use.schlund.de) by mxintern.kundenserver.de with esmtp (Exim 3.35 #1) id 19eaG6-0004ZU-00 for zsh-users@sunsite.dk; Mon, 21 Jul 2003 14:59:18 +0200 Received: from luthien by erdbeere.use.schlund.de with local id 19eaHY-00033u-00 for ; Mon, 21 Jul 2003 15:00:48 +0200 Date: Mon, 21 Jul 2003 15:00:48 +0200 From: Dominik Vogt To: Zsh Users Subject: trapping sigchld? Message-ID: <20030721130048.GB8902@gmx.de> Reply-To: dominik.vogt@gmx.de Mail-Followup-To: Zsh Users Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i 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 ^_^ ^_^