From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#7225: 23.2.50; [PATCH] C-c C-c doesn't work in shell mode (Cygwin) Date: Sat, 16 Oct 2010 09:32:32 +0200 Message-ID: <83iq12bnjj.fsf@gnu.org> References: <4CB8E584.1090800@cornell.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1287214953 26063 80.91.229.12 (16 Oct 2010 07:42:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Oct 2010 07:42:33 +0000 (UTC) Cc: 7225@debbugs.gnu.org To: Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 16 09:42:31 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P71PS-0004LU-Vx for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Oct 2010 09:42:31 +0200 Original-Received: from localhost ([127.0.0.1]:42588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P71PS-0003tj-9B for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Oct 2010 03:42:30 -0400 Original-Received: from [140.186.70.92] (port=50562 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P71PL-0003tS-2q for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2010 03:42:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P71PK-0006NP-09 for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2010 03:42:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P71PJ-0006NI-UZ for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2010 03:42:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P71DU-0005C3-S5; Sat, 16 Oct 2010 03:30:08 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Oct 2010 07:30:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7225 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 7225-submit@debbugs.gnu.org id=B7225.128721415719894 (code B ref 7225); Sat, 16 Oct 2010 07:30:08 +0000 Original-Received: (at 7225) by debbugs.gnu.org; 16 Oct 2010 07:29:17 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P71Cf-0005Ap-DE for submit@debbugs.gnu.org; Sat, 16 Oct 2010 03:29:17 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P71Cc-0005Aj-HJ for 7225@debbugs.gnu.org; Sat, 16 Oct 2010 03:29:15 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LAD00200GW39M00@a-mtaout23.012.net.il> for 7225@debbugs.gnu.org; Sat, 16 Oct 2010 09:32:32 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.93.189]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LAD001PUGY6UHB0@a-mtaout23.012.net.il>; Sat, 16 Oct 2010 09:32:32 +0200 (IST) In-reply-to: <4CB8E584.1090800@cornell.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 16 Oct 2010 03:30:08 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40917 Archived-At: > Date: Fri, 15 Oct 2010 19:36:36 -0400 > From: Ken Brown > Cc: > > I think I can fix a longstanding bug in the Cygwin build of emacs, in > which C-c C-c doesn't work to interrupt a process in shell mode. Since > the problem doesn't seem to be in the bug database, I'm reporting it > first for documentation purposes, and then I'll give the proposed fix. > To reproduce: > > emacs -Q > M-x shell > cat > C-c C-c > (The cat process doesn't get killed.) Is the reason for this known? It looks like the `kill' syscall isn't doing its job, but if that's so, there should be a good reason for that. > The following patch seems to fix it: > > === modified file 'src/s/cygwin.h' > --- src/s/cygwin.h 2010-01-13 08:35:10 +0000 > +++ src/s/cygwin.h 2010-10-15 22:20:39 +0000 > @@ -132,6 +132,9 @@ > returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */ > #define G_SLICE_ALWAYS_MALLOC > > +/* Send signals to subprocesses by "typing" special chars at them. */ > +#define SIGNALS_VIA_CHARACTERS > + > /* the end */ > > /* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b > > I'd like to apply this to the emacs-23 branch. Does anyone see a > problem with it or anything further I should test? Did you test it with a subprogram that puts its stdin into a mode where (speaking in termios terms) the ISIG flag in c_lflag passed to tcsetattr is unset? In any case, I wouldn't recommend to take this workaround unless we understand why this doesn't work without it.