From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vincent Lefevre Newsgroups: gmane.emacs.bugs Subject: bug#11886: 24.1; Ctrl-G in an emacs running in a terminal sends a SIGINT to the parent shell Date: Tue, 7 Aug 2012 16:05:07 +0200 Message-ID: <20120807140507.GB5316@xvii.vinc17.org> References: <874nph2kwd.fsf@xvii.vinc17.org> <20120709160857.GL5847@xvii.vinc17.org> <20120710001815.GR5847@xvii.vinc17.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1344348379 5284 80.91.229.3 (7 Aug 2012 14:06:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Aug 2012 14:06:19 +0000 (UTC) Cc: 11886@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 07 16:06:18 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SykQM-0002Dq-I6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Aug 2012 16:06:18 +0200 Original-Received: from localhost ([::1]:34379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SykQL-0001Um-Og for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Aug 2012 10:06:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SykQF-0001Tz-5l for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2012 10:06:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SykQ7-0007Bc-Bz for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2012 10:06:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SykQ7-0007BX-8C for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2012 10:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SykXp-0004m1-HV for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2012 10:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincent Lefevre Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Aug 2012 14:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11886 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11886-submit@debbugs.gnu.org id=B11886.134434879018279 (code B ref 11886); Tue, 07 Aug 2012 14:14:01 +0000 Original-Received: (at 11886) by debbugs.gnu.org; 7 Aug 2012 14:13:10 +0000 Original-Received: from localhost ([127.0.0.1]:39808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SykWz-0004kl-UR for submit@debbugs.gnu.org; Tue, 07 Aug 2012 10:13:10 -0400 Original-Received: from vinc17.pck.nerim.net ([213.41.242.187]:49463 helo=smtp-xvii.vinc17.net) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SykWy-0004ke-3b for 11886@debbugs.gnu.org; Tue, 07 Aug 2012 10:13:09 -0400 Original-Received: by xvii.vinc17.org (Postfix, from userid 1000) id 0AD5632C009; Tue, 7 Aug 2012 16:05:07 +0200 (CEST) Content-Disposition: inline In-Reply-To: X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6215-vl-r53514 (2012-07-22) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62911 Archived-At: I've reported the problem in the Debian BTS for dash: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D683671 Now I remember that the problem is described on: http://www.cons.org/cracauer/sigint.html And contrary to what I've said, zsh is also buggy, but only in the case where the command is *not* the last one (I suppose that this difference is because zsh does an exec for the last command, when possible). On 2012-07-10 08:52:38 +0200, Andreas Schwab wrote: > Vincent Lefevre writes: >=20 > > It seems that the condition is that the command traps the signal. >=20 > Of course. A command that exits on C-c exits on C-c. Actually, no. This was my test that was buggy: ypig:~> cat trap.sh #!/bin/bash trap 'kill -INT $$' INT sleep 3 ypig:~> zsh -c trap.sh; echo foo ^Czsh: exit 130 zsh -c trap.sh foo A correct test, with trap 'trap - INT; kill -INT $$' INT shows that "foo" is not output, as expected. --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)