GNU bug report logs - #11886
24.1; Ctrl-G in an emacs running in a terminal sends a SIGINT to the parent shell

Previous Next

Package: emacs;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Mon, 9 Jul 2012 12:19:01 UTC

Severity: normal

Merged with 12038

Found in version 24.1

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 11886 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 11886 <at> debbugs.gnu.org
Subject: Re: 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
I've reported the problem in the Debian BTS for dash:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683671

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 <vincent <at> vinc17.net> writes:
> 
> > It seems that the condition is that the command traps the signal.
> 
> 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.

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




This bug report was last modified 12 years and 261 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.