From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17047 invoked from network); 19 Jul 2009 18:32:27 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 19 Jul 2009 18:32:27 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 45578 invoked from network); 19 Jul 2009 18:32:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Jul 2009 18:32:17 -0000 Received: (qmail 22483 invoked by alias); 19 Jul 2009 18:32:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27166 Received: (qmail 22469 invoked from network); 19 Jul 2009 18:32:08 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 19 Jul 2009 18:32:08 -0000 Received: from vms173017pub.verizon.net (vms173017pub.verizon.net [206.46.173.17]) by bifrost.dotsrc.org (Postfix) with ESMTP id 682928027106 for ; Sun, 19 Jul 2009 20:32:04 +0200 (CEST) Received: from torch.brasslantern.com ([96.238.220.32]) by vms173017.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KN100LM5KT0P7NW@vms173017.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 19 Jul 2009 13:31:53 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id n6JIVlpD003142 for ; Sun, 19 Jul 2009 11:31:48 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n6JIVl3r003141 for zsh-workers@sunsite.dk; Sun, 19 Jul 2009 11:31:47 -0700 From: Bart Schaefer Message-id: <090719113147.ZM3140@torch.brasslantern.com> Date: Sun, 19 Jul 2009 11:31:47 -0700 In-reply-to: <20090718230930.GB5412@xvii> Comments: In reply to Vincent Lefevre "Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in emacs under Mac OS X" (Jul 19, 1:09am) References: <090712193623.ZM14823@torch.brasslantern.com> <200907131839.n6DIdO6Z003291@pws-pc.ntlworld.com> <20090716162419.GA26179@prunille.vinc17.org> <090717222936.ZM8648@torch.brasslantern.com> <20090718101602.GA5392@xvii> <090718113509.ZM10405@torch.brasslantern.com> <20090718230930.GB5412@xvii> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@sunsite.dk Subject: Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in emacs under Mac OS X MIME-version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.94.2/9589/Sun Jul 19 05:14:56 2009 on bifrost X-Virus-Status: Clean On Jul 19, 1:09am, Vincent Lefevre wrote: } Subject: Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in em } } > } [bash] ignores SIGINT if the caller chose to ignore it; also when } > } executing a process, it restores the trap to the default behavior, } > } in case it was ignored (that's another difference with zsh). } > } > And that's a case where I think the zsh behavior is in fact preferable. } } Is there any reason? If bash really "restores the trap to the default behavior, in case it was ignored" then I think bash is wrong because "the default behavior" is to exit on the signal. It should instead continue to ignore it, as requested by the caller, as would have happened if the caller directly exec'd the process instead of passing through bash along the way. The patch I just sent for Src/signals.c sidesteps the issue in the way I previously mentioned: without changing the eventual handling, it holds SIGINT undelivered until some other signal interrupts signal_suspend(). Hmm, looking at the #ifdef flow and considering that this affects MacOS, maybe the change in my patch needs to be in the BSD_SIGNALS section, either instead or as well.