From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63629: Fwd: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions Date: Wed, 24 May 2023 13:52:31 +0300 Message-ID: <83lehengr4.fsf@gnu.org> References: <83a5xxr1db.fsf@gnu.org> <83v8gkpk6g.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11863"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63629@debbugs.gnu.org To: Adam Ibrahim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 24 12:53:25 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1m7R-0002tp-3W for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 May 2023 12:53:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1m76-0006qe-Cr; Wed, 24 May 2023 06:53:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1m74-0006qU-Kj for bug-gnu-emacs@gnu.org; Wed, 24 May 2023 06:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1m74-0006TO-Di for bug-gnu-emacs@gnu.org; Wed, 24 May 2023 06:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q1m73-0006Q2-UI for bug-gnu-emacs@gnu.org; Wed, 24 May 2023 06:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 May 2023 10:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63629 X-GNU-PR-Package: emacs Original-Received: via spool by 63629-submit@debbugs.gnu.org id=B63629.168492553224616 (code B ref 63629); Wed, 24 May 2023 10:53:01 +0000 Original-Received: (at 63629) by debbugs.gnu.org; 24 May 2023 10:52:12 +0000 Original-Received: from localhost ([127.0.0.1]:42074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1m6F-0006Oy-Rg for submit@debbugs.gnu.org; Wed, 24 May 2023 06:52:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1m6E-0006Ol-92 for 63629@debbugs.gnu.org; Wed, 24 May 2023 06:52:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1m69-0006De-0D; Wed, 24 May 2023 06:52:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VRRILu6ThAFkwRVY6YvZ677qsO4W8DDa4W2gtqzYvM4=; b=VZM/flfjdk4f qH8U+iFq0Awisa/LiMuG6wRpLg6Y+6ucQvB2G969BeqBY+pPi33VZuQufw/rX8tcycg05rFgL2r8r AZPmYGFb6Jwm6aTTCU5rXTRRKuIakalJGUPBGO8+E+212nb9e+0k4yJotN3n/sBx3fRNzlp353Tms tL6Ua4ca/NquANCEJVGPHJaAPuQkjLelMsQVjeeqIk3nT1jJLNMeUQ2rjfzmz6Z+Ku4nplGb9zNEh RKOUo0J6Vde1bt5CliQ3VsQQa1Y7FFLM4P5IcfGE9x2bFjz1kcB5nPwmhpFlEeZ/I9Mda/au5PSQ+ ooP0Z6G3qrkbII4ifQG9pw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1m68-0004j8-Ep; Wed, 24 May 2023 06:52:04 -0400 In-Reply-To: (message from Adam Ibrahim on Tue, 23 May 2023 16:30:14 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262283 Archived-At: > From: Adam Ibrahim > Date: Tue, 23 May 2023 16:30:14 -0400 > Cc: 63629@debbugs.gnu.org > > I ran the following commands on my phone in termux and in Kitty on my PC 10 times each and record > the results. I did it multiple times because the results seem random. > > ./src/emacs --fg-daemon -Q > ./lib-src/emacsclient path/to/no-perms # in a separate terminal, 10 times > > Phone + Termux: 9 out of 10 times, I got the expected results where the terminal was not broken and I > saw an error message. on the 10th time there was some weird behavior, but I haven't been able to > reproduce it and I don't remember what happened. > > PC + Kitty: there were no crashes meaning the terminal wasn't broken anymore. but 6 out of 10 times > the error message didn't print. sometimes all I saw was "waiting for emacs..." and some other times > all I saw was "...". the other four times was expected behavior colon the error message printed and the > terminal wasn't broken. > > Note: I have a slightly different environment on my phone compared to the first time. when I first > reported the bug I was using the emacs and emacsclient programs located on my phone. this time I > used the modified emacs and emacsclient from my desktop over SSH. I don't know if that changed the > results. But the bug with unmodified emacs happens just the same over SSH as with emacs on my > phone. If the only problem you see after the change is that you don't always see the error message, then it's expected. emacsclient outputs the error message to stderr, and when there's a client frame on that display, it is impossible to make sure the error message will always be shown, before it is erased when the terminal is closed by the server Emacs process. So the only thing the fix tries to guarantee is that you will be able to use the terminal after emacsclient exits. If this happens in all the configurations you tried, then the goal of the change is achieved, and I don't think we can do much more.