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#72117: Command doesn't execute correctly in eshell Date: Sat, 27 Jul 2024 09:40:10 +0300 Message-ID: <868qxn2v91.fsf@gnu.org> References: <51486b9f-cc61-62af-8529-8850fb98f051@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31540"; mail-complaints-to="usenet@ciao.gmane.io" Cc: the_wurfkreuz@proton.me, 72117@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 27 08:41:09 2024 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 1sXb76-00084B-JQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Jul 2024 08:41:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXb6t-0004lF-OK; Sat, 27 Jul 2024 02:40:55 -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 1sXb6r-0004kn-Vj for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 02:40:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sXb6q-00049F-Rc for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 02:40:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sXb70-0001IF-EE for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 02:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jul 2024 06:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72117 X-GNU-PR-Package: emacs Original-Received: via spool by 72117-submit@debbugs.gnu.org id=B72117.17220624384932 (code B ref 72117); Sat, 27 Jul 2024 06:41:02 +0000 Original-Received: (at 72117) by debbugs.gnu.org; 27 Jul 2024 06:40:38 +0000 Original-Received: from localhost ([127.0.0.1]:40406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXb6b-0001HU-JX for submit@debbugs.gnu.org; Sat, 27 Jul 2024 02:40:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXb6a-0001HD-5m for 72117@debbugs.gnu.org; Sat, 27 Jul 2024 02:40:36 -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 1sXb6K-0003lk-NP; Sat, 27 Jul 2024 02:40:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=U/nBDCDB+CnGveHRFRGF++Q2OsMGRaODu67v0qFzTiw=; b=X8eRe/fynJZM4NmQRmXS yS9G3y/B16pvS/LmeeKR8XVmXTGgQHzU6kO4DC5zwXpHUqnpqWMj9wwCQ0kZSTBSdegmz6OH/84+n eeI0VlMYF9B/2+RtEMphPUwGDedRV0Kfacfh6LQGotxYZ8t8LAqSVhmrxt2Rj7QqVu1OUgqK3mRMz p2EXw67nKGIv6D3muwuPj/ncrG8+Zml+EExJKAx0zTzuD9+1rjvLkA9U4RmmnqSWwre1GjJqe39qM i4BMRnZ0JygbF9nKQblSItF5z5IKHG1nlnCKRgeLU5q9ME96wHAVRwMvLkJPqk8LJHDGJX33KlolY vPMGTv+l50pyqQ==; In-Reply-To: <51486b9f-cc61-62af-8529-8850fb98f051@gmail.com> (message from Jim Porter on Fri, 26 Jul 2024 22:18:22 -0700) 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:289405 Archived-At: > Date: Fri, 26 Jul 2024 22:18:22 -0700 > From: Jim Porter > Cc: eliz@gnu.org > > On 7/14/2024 6:01 PM, Jim Porter wrote: > > On 7/14/2024 12:33 PM, the_wurfkreuz via Bug reports for GNU Emacs, the > > Swiss army knife of text editors wrote: > >  But that's not the most interesting part. I can execute the > >> command with 'eshell/sudo'. But after the command execution emacs will > >> take the whole CPU processing time if i have > >> '(global-display-line-numbers-mode 1)' > >> option enabled. > > > > I can't reproduce this particular issue, but I can reproduce *an* issue. > > It seems to be due to "head -10" exiting early (as it should), which > > results in a broken pipe. However, Eshell's broken pipe handling wasn't > > properly cleaning up the process ("grep" in this example). > > Eli, would this patch (re-attached here) be ok for Emacs 30? It's not a > perfect solution (the fix currently on master is much better), but it's > the least-risky change to this code that I could make, and it should > improve matters somewhat for the release branch. This is okay for emacs-30, thanks.