From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21667 invoked from network); 12 Jul 2009 21:50:41 -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; 12 Jul 2009 21:50:41 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 91137 invoked from network); 12 Jul 2009 21:50:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Jul 2009 21:50:32 -0000 Received: (qmail 14154 invoked by alias); 12 Jul 2009 21:50:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27142 Received: (qmail 14119 invoked from network); 12 Jul 2009 21:50:22 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 12 Jul 2009 21:50:22 -0000 Received: from vms173015pub.verizon.net (vms173015pub.verizon.net [206.46.173.15]) by bifrost.dotsrc.org (Postfix) with ESMTP id 3760780307FA for ; Sun, 12 Jul 2009 23:50:18 +0200 (CEST) Received: from torch.brasslantern.com ([96.238.220.32]) by vms173015.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KMO00LHRVBEXTN8@vms173015.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 12 Jul 2009 16:50:08 -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 n6CLo1bZ014605 for ; Sun, 12 Jul 2009 14:50:02 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n6CLo104014604 for zsh-workers@sunsite.dk; Sun, 12 Jul 2009 14:50:01 -0700 From: Bart Schaefer Message-id: <090712145001.ZM14603@torch.brasslantern.com> Date: Sun, 12 Jul 2009 14:50:01 -0700 In-reply-to: <20090712205905.GA7803@xvii.home> Comments: In reply to Vincent Lefevre "zsh 4.3.10 terminates with SIGINT when one types Ctrl-G in emacs under Mac OS X" (Jul 12, 10:59pm) References: <20090712205905.GA7803@xvii.home> 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/9557/Sun Jul 12 22:01:16 2009 on bifrost X-Virus-Status: Clean On Jul 12, 10:59pm, Vincent Lefevre wrote: } } Consider a script with a line like } } /usr/bin/emacs -Q -nw } } Run it with: } } zsh -f ./script } } and type Ctrl-G in Emacs. Then zsh terminates with a SIGINT, killing } Emacs at the same time. This must be happening because either (1) emacs resets the TTY intr character to ^G or (2) emacs is sending a SIGINT to the terminal pgrp when it sees ^G. Experimenting with "trap 'stty -a' INT" seems to point to the latter, but the SIGINT only makes it through to zsh once (or at least the trap fires only on the first ^G). Either way, I think this is a problem with emacs rather than zsh. Try replacing emacs with a command that doesn't do its own input handling ("sleep 10", perhaps) and then type the normal intr character (^C). Do you expect the script to exit on *that* SIGINT? [It does.]