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#54062: 29.0.50; [PATCH] Eshell should inform processes when a pipe is broken Date: Sat, 19 Feb 2022 10:35:33 +0200 Message-ID: <83mtinz222.fsf@gnu.org> References: <7da3e8b2-7400-dca6-6d92-0a60e3d9c215@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30673"; mail-complaints-to="usenet@ciao.gmane.io" 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 Sat Feb 19 09:36:13 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 1nLLDw-0007oT-UG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Feb 2022 09:36:13 +0100 Original-Received: from localhost ([::1]:55908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLLDv-0000Sy-CT for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Feb 2022 03:36:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLLDn-0000So-Cs for bug-gnu-emacs@gnu.org; Sat, 19 Feb 2022 03:36:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34696) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLLDm-0005S8-Lx for bug-gnu-emacs@gnu.org; Sat, 19 Feb 2022 03:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nLLDm-0007m6-66 for bug-gnu-emacs@gnu.org; Sat, 19 Feb 2022 03:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Feb 2022 08:36: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.164525974329860 (code B ref 54062); Sat, 19 Feb 2022 08:36:02 +0000 Original-Received: (at 54062) by debbugs.gnu.org; 19 Feb 2022 08:35:43 +0000 Original-Received: from localhost ([127.0.0.1]:56826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLLDT-0007lY-07 for submit@debbugs.gnu.org; Sat, 19 Feb 2022 03:35:43 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLLDQ-0007lL-Hh for 54062@debbugs.gnu.org; Sat, 19 Feb 2022 03:35:41 -0500 Original-Received: from [2001:470:142:3::e] (port=50264 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLLDL-0005Ia-7I; Sat, 19 Feb 2022 03:35:35 -0500 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=TpEiQpWmIZZi11GfoA0kkGa5XJlUAigQVq9UQHIPuI8=; b=SnpQ0x3CSj8l 7kDAzyd0lsPkjJnxcCT7vtH173ErEhIhgg/SIopdY+RuXGHAmY4Rhqq/i2ndzNGddKF0lVC2O6Pm1 /Ic4yhKSKTwhr5L3vh9+nowUYbPyRKgJwJ8UnL8/hquEVWMOMf3oJVoZ5oHKF/ovSZ08B+tcJfudN U1vgwbvOArMEari4CXeXo3sxsP1SFlKqKdFShtzXRQXLD/axkKj6OnS4ubdkFok6j/v9EYSDcutwO ArHuO0/vXf+UHKz6CYVHmwSTyZOjBqXqtx60QXFT7ewiJMSgUE/V4nUfbWJh/g1QebL2+XP8Si1YB 0CfhTI8fxg/DPrjNwE7tJg==; Original-Received: from [87.69.77.57] (port=2571 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 1nLLDK-0003r4-M8; Sat, 19 Feb 2022 03:35:35 -0500 In-Reply-To: <7da3e8b2-7400-dca6-6d92-0a60e3d9c215@gmail.com> (message from Jim Porter on Fri, 18 Feb 2022 20:20:10 -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:227173 Archived-At: > From: Jim Porter > Date: Fri, 18 Feb 2022 20:20:10 -0800 > > Consider the following shell command: > > yes | sh -c 'read NAME' > > Ordinarily, you'd expect that `sh' reads a single "y", exits, and then > the next time `yes' tries to write, it finds that the pipe was broken. > However, that's not what happens in Eshell. Running the above and then > calling `M-x list-processes' will show that `yes' is still running. > > Attached is a patch (with a test) to fix this by telling Eshell to > signal SIGPIPE at the appropriate time. SIGPIPE isn't supported on MS-Windows, so I think we should have a fallback there for platforms that don't support SIGPIPE. Thanks.