From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9540 invoked from network); 29 Mar 2006 19:10:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Mar 2006 19:10:12 -0000 Received: (qmail 10808 invoked from network); 29 Mar 2006 19:10:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Mar 2006 19:10:04 -0000 Received: (qmail 12845 invoked by alias); 29 Mar 2006 19:09:57 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10107 Received: (qmail 12827 invoked from network); 29 Mar 2006 19:09:57 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 Mar 2006 19:09:57 -0000 Received: (qmail 9723 invoked from network); 29 Mar 2006 19:09:56 -0000 Received: from mta08-winn.ispmail.ntl.com (HELO mtaout02-winn.ispmail.ntl.com) (81.103.221.48) by a.mx.sunsite.dk with SMTP; 29 Mar 2006 19:09:56 -0000 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20060329190954.OQAX29040.mtaout02-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Wed, 29 Mar 2006 20:09:54 +0100 Received: from pwslaptop.csr.com ([81.107.44.171]) by aamtaout04-winn.ispmail.ntl.com with ESMTP id <20060329190954.QKBH12840.aamtaout04-winn.ispmail.ntl.com@pwslaptop.csr.com> for ; Wed, 29 Mar 2006 20:09:54 +0100 Received: from pwslaptop.csr.com (pwslaptop.csr.com [127.0.0.1]) by pwslaptop.csr.com (8.13.4/8.13.4) with ESMTP id k2TJ9mjr003519 for ; Wed, 29 Mar 2006 20:09:48 +0100 Received: from pwslaptop.csr.com (pws@localhost) by pwslaptop.csr.com (8.13.4/8.13.4/Submit) with ESMTP id k2TJ9mj5003516 for ; Wed, 29 Mar 2006 20:09:48 +0100 Message-Id: <200603291909.k2TJ9mj5003516@pwslaptop.csr.com> X-Authentication-Warning: pwslaptop.csr.com: pws owned process doing -bs From: Peter Stephenson To: zsh-users@sunsite.dk Subject: Re: does zsh ignore the QUIT signal? In-Reply-To: Message from Vincent Lefevre of "Wed, 29 Mar 2006 11:03:39 +0200." <20060329090339.GF22295@prunille.vinc17.org> Date: Wed, 29 Mar 2006 20:09:48 +0100 Vincent Lefevre wrote: > When I type "while true; do true; done" from an interactive zsh shell, > I can't interrupt it with SIGQUIT (either with Ctrl-\ or with the > "kill -QUIT " command): sending this signal has no effect. Is > this normal? Yes, although I had to search the source code to find this out. The shell has ignored it at least as far back as the CVS archive goes (April 1999). This should let you interrupt the shell with it: TRAPQUIT() { return $(( 128 + $1 )); } It doesn't set the return status, unlike SIGINT, however (and because it's handled there's no core dump). This documents it. Index: Doc/Zsh/jobs.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/jobs.yo,v retrieving revision 1.4 diff -u -r1.4 jobs.yo --- Doc/Zsh/jobs.yo 2 Jul 2004 14:59:14 -0000 1.4 +++ Doc/Zsh/jobs.yo 29 Mar 2006 19:04:07 -0000 @@ -95,6 +95,7 @@ The tt(INT) and tt(QUIT) signals for an invoked command are ignored if the command is followed by `tt(&)' and the tt(MONITOR) option is not active. +The shell itself always ignores the tt(QUIT) signal. Otherwise, signals have the values inherited by the shell from its parent (but see the tt(TRAP)var(NAL) special functions in noderef(Functions)). -- Peter Stephenson Web page still at http://www.pwstephenson.fsnet.co.uk/