From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#54062: 29.0.50; [PATCH] Eshell should inform processes when a pipe is broken Date: Wed, 23 Feb 2022 13:14:18 +0100 Message-ID: <87wnhl7pb9.fsf@gnus.org> References: <7da3e8b2-7400-dca6-6d92-0a60e3d9c215@gmail.com> <83mtinz222.fsf@gnu.org> <83ley6y5gx.fsf@gnu.org> <83a6emxak3.fsf@gnu.org> <272c6d13-6d35-a896-1468-2c9bc3befe87@gmail.com> <83a6ekuomt.fsf@gnu.org> <87k0dof7az.fsf@gnus.org> <835yp8ul58.fsf@gnu.org> <71c773bd-1166-8d36-5dac-8d6b81240a2a@gmail.com> <83o82zt5dy.fsf@gnu.org> <88900d29-fef0-6361-eb9f-b50a76e6e50b@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36176"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 54062@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 23 13:16:04 2022 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 1nMqYu-0009CO-AB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Feb 2022 13:16:04 +0100 Original-Received: from localhost ([::1]:34554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMqYt-0008I6-8h for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Feb 2022 07:16:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMqXx-0008Ee-LP for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 07:15:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nMqXu-0002UX-7G for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 07:15:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nMqXu-0003zh-46 for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 07:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Feb 2022 12:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54062 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54062-submit@debbugs.gnu.org id=B54062.164561847915311 (code B ref 54062); Wed, 23 Feb 2022 12:15:02 +0000 Original-Received: (at 54062) by debbugs.gnu.org; 23 Feb 2022 12:14:39 +0000 Original-Received: from localhost ([127.0.0.1]:44135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMqXP-0003yj-Dt for submit@debbugs.gnu.org; Wed, 23 Feb 2022 07:14:39 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:33822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMqXN-0003yV-LB for 54062@debbugs.gnu.org; Wed, 23 Feb 2022 07:14:29 -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=irkQXFhRkdOowA3S+/jPvcI1539XxpGgZ3rfWCE/67Y=; b=Ep47QRP7++B8OGUWq8HZ4HlwdM S+xd0BgreNKVyUmA/0/okp+leDagDBXYk7WG3f4Tfb308RVVSv3i43VdaL51eZqMe6Xue9uz0ysw4 JwXbO79FlxmquCzgVEXmvhLsrep901iOuhcgEbFxqf9JMzjm/X476xUSa0pVM0ybcPok=; Original-Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMqXE-0001Nq-J1; Wed, 23 Feb 2022 13:14:23 +0100 X-Now-Playing: Cat Power's _Covers_: "I'll Be Seeing You" In-Reply-To: <88900d29-fef0-6361-eb9f-b50a76e6e50b@gmail.com> (Jim Porter's message of "Tue, 22 Feb 2022 08:49:06 -0800") 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" Xref: news.gmane.io gmane.emacs.bugs:227504 Archived-At: Jim Porter writes: >> Thanks, this fixes the test. However, I'm unsure we should fix this >> inside eshell-sentinel: do we always want to ignore "broken pipe" >> errors in Eshell subprocesses, and never show them to the user? > > I think we do want to ignore that error here. In `eshell-sentinel', we > only run the `finish-io' code when the subprocess's state has already > changed; in this case, that means the subprocess has already been > terminated, since Eshell doesn't handle cases like SIGSTOP or SIGCONT > yet (see the commented out functions at the bottom of > lisp/eshell/esh-proc.el). Normally, if we detect a broken pipe, we'd > want to signal the subprocess that tried to write, but since we know > it's already been terminated, there's no (living) process to signal > anymore. Makes sense to me, I think, so I pushed the patch to Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no