From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24071 invoked from network); 13 Jul 2009 00:44:11 -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.6 required=5.0 tests=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; 13 Jul 2009 00:44:11 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 35791 invoked from network); 13 Jul 2009 00:44:02 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Jul 2009 00:44:02 -0000 Received: (qmail 25002 invoked by alias); 13 Jul 2009 00:43:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27143 Received: (qmail 24989 invoked from network); 13 Jul 2009 00:43:53 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 13 Jul 2009 00:43:53 -0000 Received: from smtp2f.orange.fr (smtp2f.orange.fr [80.12.242.151]) by bifrost.dotsrc.org (Postfix) with ESMTP id 1203280307FA for ; Mon, 13 Jul 2009 02:43:49 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2f11.orange.fr (SMTP Server) with ESMTP id 66D9080000A9; Mon, 13 Jul 2009 02:43:49 +0200 (CEST) Received: from xvii.vinc17.org (ANancy-552-1-48-18.w92-141.abo.wanadoo.fr [92.141.199.18]) by mwinf2f11.orange.fr (SMTP Server) with ESMTP id 4DA0F80000A1; Mon, 13 Jul 2009 02:43:49 +0200 (CEST) X-ME-UUID: 20090713004349318.4DA0F80000A1@mwinf2f11.orange.fr Received: from vinc17 by xvii.vinc17.org with local (Exim 4.69) (envelope-from ) id 1MQ9e0-0003wQ-Rr; Mon, 13 Jul 2009 02:43:48 +0200 Date: Mon, 13 Jul 2009 02:43:48 +0200 From: Vincent Lefevre 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 Message-ID: <20090713004348.GC7803@xvii.home> Mail-Followup-To: zsh-workers@sunsite.dk References: <20090712205905.GA7803@xvii.home> <090712145001.ZM14603@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <090712145001.ZM14603@torch.brasslantern.com> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.20-5982-vl-r30292 (2009-07-11) X-Virus-Scanned: ClamAV 0.94.2/9557/Sun Jul 12 22:01:16 2009 on bifrost X-Virus-Status: Clean On 2009-07-12 14:50:01 -0700, Bart Schaefer wrote: > 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). With zsh 4.3.10, all of them: with the script trap 'echo INT' INT /usr/bin/emacs -Q -nw echo OK if I hit C-g 4 times, then C-x C-c to quit emacs, I get: INT INT INT INT OK when I run the script with zsh 4.3.10, but just INT OK when I run the script with bash, ksh or zsh 4.2.3. Why does zsh 4.3.10 behave differently? > 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.] With bash, the script exits, even though it doesn't exit in the case of Ctrl-g in Emacs. I've searched on Google, and found the explanations of the various behaviors: http://www.cons.org/cracauer/sigint.html IMHO, zsh should implement WCE, just like bash. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)