From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: poor handling of multiple C-g with multi-tty (apparent hangs) Date: Tue, 16 Sep 2008 10:00:19 -0400 Message-ID: References: <48a85bf8.02a6420a.410f.ffffc5a1MFETCHER_ADDED@google.com> <9aa0cfde0809151600h6d61c248g3e801ccc3d363cc2@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221573652 17199 80.91.229.12 (16 Sep 2008 14:00:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Sep 2008 14:00:52 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: "Ami Fischman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 16 16:01:48 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kfb7V-0005c7-63 for ged-emacs-devel@m.gmane.org; Tue, 16 Sep 2008 16:01:33 +0200 Original-Received: from localhost ([127.0.0.1]:46065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kfb6S-0007P3-7B for ged-emacs-devel@m.gmane.org; Tue, 16 Sep 2008 10:00:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kfb6N-0007Ov-0O for emacs-devel@gnu.org; Tue, 16 Sep 2008 10:00:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kfb6M-0007Oj-KC for emacs-devel@gnu.org; Tue, 16 Sep 2008 10:00:22 -0400 Original-Received: from [199.232.76.173] (port=48542 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kfb6M-0007Og-EX for emacs-devel@gnu.org; Tue, 16 Sep 2008 10:00:22 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:55348) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kfb6K-0006bN-SY for emacs-devel@gnu.org; Tue, 16 Sep 2008 10:00:22 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtgEADdZz0hMCrQ4/2dsb2JhbACBY7c7gWWBAw X-IronPort-AV: E=Sophos;i="4.32,408,1217822400"; d="scan'208";a="26901725" Original-Received: from 76-10-180-56.dsl.teksavvy.com (HELO ceviche.home) ([76.10.180.56]) by ironport2-out.teksavvy.com with ESMTP; 16 Sep 2008 10:00:19 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id B5C25B40B1; Tue, 16 Sep 2008 10:00:19 -0400 (EDT) In-Reply-To: <9aa0cfde0809151600h6d61c248g3e801ccc3d363cc2@mail.gmail.com> (Ami Fischman's message of "Mon, 15 Sep 2008 16:00:39 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:103906 Archived-At: > This was never checked in, even though it is strictly an improvement to the > current situation (see my original email for why I believe this is an > improvement to emacs users as a whole). Are you still working on refining > it or would you mind checking it in as it is? I think your patch is going in the right direction but isn't quite right either. What we should check is whether the currently active terminal is the "controlling terminal" from which Emacs was started. An even better fix would be that if the seletected terminal is another tty, we should ideally also do something (e.g. pass a "suspend" message to the emacsclient). Basically, we want to do the suspend, but only if the selected terminal is an output_termcap, and then we want to make sure that we suspend the process associated with this terminal (either the main Emacs process or one of the emacsclients). Stefan