From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: poor handling of multiple C-g with multi-tty (apparent hangs) Date: Tue, 16 Sep 2008 06:16:13 +0300 Message-ID: References: <48a85bf8.02a6420a.410f.ffffc5a1MFETCHER_ADDED@google.com> <9aa0cfde0809151600h6d61c248g3e801ccc3d363cc2@mail.gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1221535016 2607 80.91.229.12 (16 Sep 2008 03:16:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Sep 2008 03:16:56 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org To: Ami Fischman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 16 05:17:52 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 1KfR4W-00035E-2g for ged-emacs-devel@m.gmane.org; Tue, 16 Sep 2008 05:17:48 +0200 Original-Received: from localhost ([127.0.0.1]:53822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KfR3U-0002xu-UY for ged-emacs-devel@m.gmane.org; Mon, 15 Sep 2008 23:16:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KfR3Q-0002vS-4P for emacs-devel@gnu.org; Mon, 15 Sep 2008 23:16:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KfR3P-0002uH-AN for emacs-devel@gnu.org; Mon, 15 Sep 2008 23:16:39 -0400 Original-Received: from [199.232.76.173] (port=35324 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KfR3P-0002u9-7f for emacs-devel@gnu.org; Mon, 15 Sep 2008 23:16:39 -0400 Original-Received: from mtaout5.012.net.il ([84.95.2.13]:52728) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KfR3P-0002WD-2z for emacs-devel@gnu.org; Mon, 15 Sep 2008 23:16:39 -0400 Original-Received: from HOME-C4E4A596F7 ([87.70.4.235]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K79002UZQGC5NA2@i_mtaout5.012.net.il> for emacs-devel@gnu.org; Tue, 16 Sep 2008 06:17:01 +0300 (IDT) In-reply-to: <9aa0cfde0809151600h6d61c248g3e801ccc3d363cc2@mail.gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 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:103895 Archived-At: > Date: Mon, 15 Sep 2008 16:00:39 -0700 > From: "Ami Fischman" > Cc: emacs-devel@gnu.org > > On Mon, Aug 11, 2008 at 10:40 AM, Chong Yidong wrote: > > > "Ami Fischman" writes: > > > > > Emacs has code to deal with C-g being entered while a quit is already > > > in progress, meant to suspend emacs and drop the user to the superior > > > shell or debugger (see section 59.7 Emergency Escape of the emacs > > > info). This is done if emacs believes it's a good idea, which > > > criteria includes "running in tty mode". Unfortunately this was never > > > updated to work correctly with the multi-tty patch. > > > > Thanks for pointing this out. > > > > IIUC, the "emergency C-g" behavior is geared towards the traditional > > setup where there's only one text-only terminal available. There, the > > emergency C-g is the only way to drop back to the shell if Emacs gets > > stuck. > > > > It's disabled for graphical terminals because there, you can open up a > > separate terminal to kill/suspend the Emacs process. > > > > This implies that we should disable the emergency C-g if Emacs is > > running on more than one terminal, as in the following patch. I don't understand the problem(s) with the current code, nor the reason why the emergency shutdown should only work when there's only one terminal. Perhaps the intent was to check if some of the other terminals are non-tty's? Could someone explain the problem and the reasoning for the proposed solution?