From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5996 invoked from network); 19 Jul 2009 18:04:22 -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:04:22 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 37505 invoked from network); 19 Jul 2009 18:04:14 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Jul 2009 18:04:14 -0000 Received: (qmail 22999 invoked by alias); 19 Jul 2009 18:04:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27165 Received: (qmail 22977 invoked from network); 19 Jul 2009 18:04:03 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 19 Jul 2009 18:04:03 -0000 Received: from vms173011pub.verizon.net (vms173011pub.verizon.net [206.46.173.11]) by bifrost.dotsrc.org (Postfix) with ESMTP id 346CF8027106 for ; Sun, 19 Jul 2009 20:04:00 +0200 (CEST) Received: from torch.brasslantern.com ([96.238.220.32]) by vms173011.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KN100KTNJI4YJJR@vms173011.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 19 Jul 2009 13:03:47 -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 n6JI3dCd003128 for ; Sun, 19 Jul 2009 11:03:40 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n6JI3dsc003127 for zsh-workers@sunsite.dk; Sun, 19 Jul 2009 11:03:39 -0700 From: Bart Schaefer Message-id: <090719110339.ZM3126@torch.brasslantern.com> Date: Sun, 19 Jul 2009 11:03:36 -0700 In-reply-to: <090718111615.ZM10393@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in emacs under Mac OS X" (Jul 18, 11:16am) 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> <090718111615.ZM10393@torch.brasslantern.com> 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 18, 11:16am, Bart Schaefer wrote: } } This was changed in this patch ... } } * 23067: Doc/Zsh/builtins.yo, Src/jobs.c, Src/signals.c: } queue traps but handle signals when waiting for jobs or processes, } unless TRAPSASYNC is set or the wait builtin is in use, so as } to handle untrapped signals in a timely fashion; document that } negative or zero process IDs after kill may be handled specially } by the OS. The following small change appears to restore the old behavior for SIGINT. The question is whether this should be applied to other signals that are known to cause process termination, such as SIGQUIT. I'm also not sure whether it's really necessary to test sigtrapped[], or whether I've got the sense of that test right. Index: Src/signals.c =================================================================== diff -c -r1.22 signals.c --- Src/signals.c 28 Feb 2009 07:13:37 -0000 1.22 +++ Src/signals.c 19 Jul 2009 17:52:28 -0000 @@ -353,6 +353,8 @@ #endif /* BROKEN_POSIX_SIGSUSPEND */ sigemptyset(&set); + if (!(isset(TRAPSASYNC) || (sigtrapped[SIGINT] & ~ZSIG_IGNORED))) + sigaddset(&set, SIGINT); #ifdef BROKEN_POSIX_SIGSUSPEND sigprocmask(SIG_SETMASK, &set, &oset); pause(); --