From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown 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 14:22:50 -0400 Message-ID: <4CB9ED7A.5000805@cornell.edu> References: <4CB8E584.1090800@cornell.edu> <83iq12bnjj.fsf@gnu.org> <4CB99E2C.5030904@cornell.edu> <838w1yb757.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1287254556 15140 80.91.229.12 (16 Oct 2010 18:42:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Oct 2010 18:42:36 +0000 (UTC) Cc: "7225@debbugs.gnu.org" <7225@debbugs.gnu.org> To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 16 20:42:34 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 1P7BiB-0004ZP-5k for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Oct 2010 20:42:31 +0200 Original-Received: from localhost ([127.0.0.1]:52437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7BiA-0004x0-J9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Oct 2010 14:42:30 -0400 Original-Received: from [140.186.70.92] (port=58338 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7Bi5-0004wm-2R for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2010 14:42:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7Bi3-0004Lp-Lp for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2010 14:42:24 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7Bi3-0004Lc-FD for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2010 14:42:23 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P7BMR-0004E7-4n; Sat, 16 Oct 2010 14:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown 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 18:20:03 +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.128725315316236 (code B ref 7225); Sat, 16 Oct 2010 18:20:03 +0000 Original-Received: (at 7225) by debbugs.gnu.org; 16 Oct 2010 18:19:13 +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 1P7BLd-0004Dp-0c for submit@debbugs.gnu.org; Sat, 16 Oct 2010 14:19:13 -0400 Original-Received: from granite1.mail.cornell.edu ([128.253.83.141] helo=authusersmtp.mail.cornell.edu) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7BLb-0004Di-0g for 7225@debbugs.gnu.org; Sat, 16 Oct 2010 14:19:11 -0400 Original-Received: from [192.168.1.5] (cpe-67-249-196-94.twcny.res.rr.com [67.249.196.94]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id o9GIMmAB000174 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sat, 16 Oct 2010 14:22:49 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 In-Reply-To: <838w1yb757.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 16 Oct 2010 14:20:03 -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:40926 Archived-At: On 10/16/2010 9:26 AM, Eli Zaretskii wrote: >> Date: Sat, 16 Oct 2010 08:44:28 -0400 >> From: Ken Brown >> CC: "7225@debbugs.gnu.org"<7225@debbugs.gnu.org> >> >>>> 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 problem is the group id in the call to 'kill'. Cygwin doesn't >> define TIOCGPGRP, and the group id as set in line 6233 of process.c >> (emacs-23 branch) is the wrong group id. > > Does Cygwin have another way of getting the process group ID? If so, > can it be used in process_send_signal instead of emacs_get_tty_pgrp? > >>> 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? >> >> I don't know how to do this. Can you give me a short test program to try? > > Sorry, no, not off-hand. > >>> In any case, I wouldn't recommend to take this workaround unless we >>> understand why this doesn't work without it. >> >> I'm not sure why you call it a workaround. The comments preceding (and >> in) the definition of process_send_signal make it clear that >> SIGNALS_VIA_CHARACTERS is the preferred method. It's used by GNU/Linux >> (see src/s/gnu-linux.h) and several other systems. > > SIGNALS_VIA_CHARACTERS is the preferred method for a few signals that > are raised by keyboard characters. But unless you find a way to send > any signal to a subprocess on Cygwin, you will still have a bug, > although not with SIGINT. OK, now I understand. > So I suggest to look into tweaking process_send_signal so that it > works with Cygwin. It looks like it makes all kinds of assumptions > regarding systems that don't have TIOCGPGRP, and they are probably > wrong for Cyugwin. Or maybe you need something special in > EMACS_KILLPG. > > When you have fixed process_send_signal, you can then introduce > SIGNALS_VIA_CHARACTERS for Cygwin. > > However, this is just a suggestion. If you don't feel like digging > into these issues, go ahead and commit the change. Thanks for the suggestion. I would like to dig into this, but I don't really know enough. I'll see if I can get some help on the Cygwin list. Ken