From unknown Thu Sep 11 06:07:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18931: 24.4; delete-frame suspends tty when running emacs on virtual terminal Resent-From: Daniel McClanahan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Nov 2014 07:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18931 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 18931@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14149990976459 (code B ref -1); Mon, 03 Nov 2014 07:19:03 +0000 Received: (at submit) by debbugs.gnu.org; 3 Nov 2014 07:18:17 +0000 Received: from localhost ([127.0.0.1]:46732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XlBu3-0001g4-Tb for submit@debbugs.gnu.org; Mon, 03 Nov 2014 02:18:17 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57157) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XlBjk-00005f-Mh for submit@debbugs.gnu.org; Mon, 03 Nov 2014 02:07:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlBje-00057N-GY for submit@debbugs.gnu.org; Mon, 03 Nov 2014 02:07:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HK_RANDOM_ENVFROM,HK_RANDOM_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlBje-00057J-Eh for submit@debbugs.gnu.org; Mon, 03 Nov 2014 02:07:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlBjd-0007db-9P for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 02:07:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlBjc-00056n-6N for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 02:07:29 -0500 Received: from mail-yh0-x231.google.com ([2607:f8b0:4002:c01::231]:42866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlBjc-00056d-2t for bug-gnu-emacs@gnu.org; Mon, 03 Nov 2014 02:07:28 -0500 Received: by mail-yh0-f49.google.com with SMTP id t59so4629896yho.22 for ; Sun, 02 Nov 2014 23:07:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=OtXMEJfGcgxGjBs/ddsE55JQd7P3Vl5wCLZOZMBLwg8=; b=aoiRnU6Y/ne8yEq6pS5f2YEp3UrJ4rXrAN9IRQbEfibIGKVtgxc/ycqgcwGGnuerhT ovPG+pJkNX6t10+T2uVoXeqU66f35f2gr+f0BDZvb/x5yCWMUp0O2UIWLh4+xFhPwrmr xT1ac1xV5GcHqzKcvOuYAXFnDpQW7rfPTXd4DZP0kqGlvR08RTh+eftBY6lWOufc2O53 AqGzLQ+fv3Q8KumvNoMLYcrz29TR8dbTax7WynZlheMynR54Lw9Aq7c5rUGm0K/Zy2Jn mP8eqp5bZFN13ed+1wJudxh4e10K2YbQqX7nceGAR5qT/21T2xxKtoeLbZK1OdpSOQmb 1+4w== X-Received: by 10.236.16.162 with SMTP id h22mr26197896yhh.71.1414998447563; Sun, 02 Nov 2014 23:07:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.170.163.86 with HTTP; Sun, 2 Nov 2014 23:07:07 -0800 (PST) From: Daniel McClanahan Date: Mon, 3 Nov 2014 01:07:07 -0600 Message-ID: Content-Type: multipart/alternative; boundary=089e015382cad3277e0506eeff31 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.4 (--) X-Mailman-Approved-At: Mon, 03 Nov 2014 02:18:14 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --089e015382cad3277e0506eeff31 Content-Type: text/plain; charset=UTF-8 When delete-frame is called, emacs eventually runs the function server-delete-client, defined in server.el. In server.el, there is an unless clause stating in the comments "Delete the client's tty, except on Windows". This assumes that if the user is using emacs with multiple frames, those separate frames are running in separate ttys. However, when I typically use emacs in multiple frames, those multiple frames are simply in separate virtual terminals within an X session. As a result, this behavior (deleting the tty) is vexing for me, since it makes closing a frame also crash emacs, which is running in the same tty (the tty is suspended and when unsuspended with fg, emacs displays text entered literally (^X and the like are displayed, for example), but does not respond to M-x or other keybindings). Obviously, this does not occur (I've checked) if: 1) Emacs is running graphically. 2) Emacs is running in gdb. To make this occur: 1) Run emacs -nw in a virtual terminal window and start server. 2) Run emacsclient -nw in another virtual terminal. 3) Run delete-frame on the client and observe the behavior in the original emacs terminal window. When I commented out that unless clause and rebuilt emacs the behavior disappears, so I'm confident I've correctly diagnosed the issue. I've created a defcustom in my local version of the development bzr branch of server.el to allow the user to specify whether this behavior should occur, defaulting to nil which enables the current behavior. Would sending a patch of this be acceptable, or does the project wish to simply continue the current behavior of server-delete-client? --089e015382cad3277e0506eeff31 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
When delete-frame is called, emacs eventually runs the fun= ction
server-delete-client, defined in server.el. In server.el, there is= an unless
clause stating in the comments "Delete the client's = tty, except on
Windows". This assumes that if the user is using ema= cs with multiple frames,
those separate frames are running in separate t= tys. However, when I typically
use emacs in multiple frames, those multi= ple frames are simply in separate
virtual terminals within an X session.= As a result, this behavior (deleting the
tty) is vexing for me, since i= t makes closing a frame also crash emacs, which is
running in the same t= ty (the tty is suspended and when unsuspended with fg,
emacs displays te= xt entered literally (^X and the like are displayed, for
example), but d= oes not respond to M-x or other keybindings).

Obviously, this does n= ot occur (I've checked) if:
1) Emacs is running graphically.
2) E= macs is running in gdb.

To make this occur:
1) Run emacs -nw in a= virtual terminal window and start server.
2) Run emacsclient -nw in ano= ther virtual terminal.
3) Run delete-frame on the client and observe the= behavior in the original emacs
terminal window.

When I commented= out that unless clause and rebuilt emacs the behavior
disappears, so I&= #39;m confident I've correctly diagnosed the issue. I've created a<= br>defcustom in my local version of the development bzr branch of server.el= to
allow the user to specify whether this behavior should occur, defaul= ting to nil
which enables the current behavior. Would sending a patch of= this be acceptable,
or does the project wish to simply continue the cur= rent behavior of
server-delete-client?
--089e015382cad3277e0506eeff31-- From unknown Thu Sep 11 06:07:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18931: 24.4; delete-frame suspends tty when running emacs on virtual terminal Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Dec 2020 10:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18931 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel McClanahan Cc: 18931@debbugs.gnu.org Received: via spool by 18931-submit@debbugs.gnu.org id=B18931.16070784134892 (code B ref 18931); Fri, 04 Dec 2020 10:41:01 +0000 Received: (at 18931) by debbugs.gnu.org; 4 Dec 2020 10:40:13 +0000 Received: from localhost ([127.0.0.1]:42945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl8VY-0001Gp-Ov for submit@debbugs.gnu.org; Fri, 04 Dec 2020 05:40:12 -0500 Received: from quimby.gnus.org ([95.216.78.240]:57156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl8VW-0001GR-2H for 18931@debbugs.gnu.org; Fri, 04 Dec 2020 05:40:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lObG91+FQIVN5DP940gNhHqJyw9DityXqmRortkZn2w=; b=vNN2q9gQXMVZrijeiUxT8YNvla DGIBXFHP6gIf4kKsp7XP0TQf91dMVenCEI+MCvKVxoGbf1rt3kXEhcqmk3PW3q5i+X05BZpZBz9cD /u+RbHcYQrrWwj6em/RU4HI9NnL9oLN0weXhHFrk0BBkkdBG+6eA7cjHfNRMwVFkEgGQ=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kl8VN-0007S4-QZ; Fri, 04 Dec 2020 11:40:04 +0100 From: Lars Ingebrigtsen References: X-Now-Playing: Fennesz's _Agora_: "We Trigger the Sun" Date: Fri, 04 Dec 2020 11:40:00 +0100 In-Reply-To: (Daniel McClanahan's message of "Mon, 3 Nov 2014 01:07:07 -0600") Message-ID: <87lfedlurj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Daniel McClanahan writes: > To make this occur: > 1) Run emacs -nw in a virtual terminal window and start server. > 2) Run emacsclient -nw in another virtual terminal. > 3) Run delete-frame on the client and observe the behavi [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Daniel McClanahan writes: > To make this occur: > 1) Run emacs -nw in a virtual terminal window and start server. > 2) Run emacsclient -nw in another virtual terminal. > 3) Run delete-frame on the client and observe the behavior in the original emacs > terminal window. (This bug report unfortunately got no response at the time.) The term "virtual terminal" isn't anything I can recall having heard before. What is that? > When I commented out that unless clause and rebuilt emacs the behavior > disappears, so I'm confident I've correctly diagnosed the issue. I've > created a defcustom in my local version of the development bzr branch > of server.el to allow the user to specify whether this behavior should > occur, defaulting to nil which enables the current behavior. Would > sending a patch of this be acceptable, or does the project wish to > simply continue the current behavior of server-delete-client? A patch would be welcome. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Thu Sep 11 06:07:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18931: 24.4; delete-frame suspends tty when running emacs on virtual terminal Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 May 2021 02:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18931 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel McClanahan Cc: 18931@debbugs.gnu.org Received: via spool by 18931-submit@debbugs.gnu.org id=B18931.162216864221564 (code B ref 18931); Fri, 28 May 2021 02:25:01 +0000 Received: (at 18931) by debbugs.gnu.org; 28 May 2021 02:24:02 +0000 Received: from localhost ([127.0.0.1]:53359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmSAM-0005bf-8j for submit@debbugs.gnu.org; Thu, 27 May 2021 22:24:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmSAJ-0005bE-Pc for 18931@debbugs.gnu.org; Thu, 27 May 2021 22:24:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jJ+BcbrfQ50AjvwjMrY9KV6wvVqZI7ZnhlKpsfVskTE=; b=QQC7MqITwRQ9xO6W1ADp7ypIqG EDnrw9i/iKJb6LCRxlf6GyqdDTLFchRBgMG6wF6d+yKl85zT1zUXCvY+jmmZYsgrGe5Caj5INw4eA yCP3Kbmri9QAR1jOxoKncoJ/2rgPmqosyMQ2+NaP7ptxJKIrR/SSPdp1czBlE3ui4+xI=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmSAB-0003kG-FH; Fri, 28 May 2021 04:23:53 +0200 From: Lars Ingebrigtsen References: <87lfedlurj.fsf@gnus.org> X-Now-Playing: The Residents's _The King & Eye: RMX_: "A Fool such as I" Date: Fri, 28 May 2021 04:23:50 +0200 In-Reply-To: <87lfedlurj.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 04 Dec 2020 11:40:00 +0100") Message-ID: <877djjy4sp.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: >> To make this occur: >> 1) Run emacs -nw in a virtual terminal window and start server. >> 2) Run emacsclient -nw in another virtual terminal. >> 3) Run delete-frame on the client and observe the be [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: >> To make this occur: >> 1) Run emacs -nw in a virtual terminal window and start server. >> 2) Run emacsclient -nw in another virtual terminal. >> 3) Run delete-frame on the client and observe the behavior in the >> original emacs >> terminal window. > > (This bug report unfortunately got no response at the time.) > > The term "virtual terminal" isn't anything I can recall having heard > before. What is that? Oh, in a different window? I've tried this recipe in Emacs 28, and I'm unable to reproduce the problem -- the original Emacs frame isn't affected by this, as far as I can see. So I'm going to go ahead and guess that this has been fixed in more recent Emacs versions. If you're still seeing this, please respond to the debbugs address and we'll reopen. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu May 27 22:24:07 2021 Received: (at control) by debbugs.gnu.org; 28 May 2021 02:24:07 +0000 Received: from localhost ([127.0.0.1]:53362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmSAQ-0005cE-G3 for submit@debbugs.gnu.org; Thu, 27 May 2021 22:24:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmSAO-0005bR-NQ for control@debbugs.gnu.org; Thu, 27 May 2021 22:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XJGLsf6q4KTjEyHJDsfgBrkGJ6dMk/pKfw6CHTPxs7A=; b=MQDy7tLqs1fjF+Ay/bvjuL4iSn NnGMbt9nnM6CRs7nHH7uOzAaoQG0k4VReed3aYJ7Eh6WUSxEgKybBLDzd7iea0ngJDz2e6oXcmHO4 A51d21gE3hlQ7gllKwHnzQK1UoIyiGu9iVDhkY+v5yEMGjBgLdRZazVNleJAEDg9qMHs=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmSAH-0003kS-9j for control@debbugs.gnu.org; Fri, 28 May 2021 04:23:59 +0200 Date: Fri, 28 May 2021 04:23:56 +0200 Message-Id: <875yz3y4sj.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18931 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 18931 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 18931 quit