From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#72117: Command doesn't execute correctly in eshell Date: Sun, 14 Jul 2024 18:01:09 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------bh6QVydpwijbtCpBMCGQNduj" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3120"; mail-complaints-to="usenet@ciao.gmane.io" To: the_wurfkreuz , 72117@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 15 03:03:19 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 1sTA7a-0000gI-Nm for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Jul 2024 03:03:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTA7L-0002Vk-Ut; Sun, 14 Jul 2024 21:03: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 1sTA7J-0002T2-JG for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2024 21:03:01 -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 1sTA7J-0006uH-Ag for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2024 21:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sTA7K-0007C0-L3 for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2024 21:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jul 2024 01:03: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.172100534127596 (code B ref 72117); Mon, 15 Jul 2024 01:03:02 +0000 Original-Received: (at 72117) by debbugs.gnu.org; 15 Jul 2024 01:02:21 +0000 Original-Received: from localhost ([127.0.0.1]:58749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTA6f-0007B1-2a for submit@debbugs.gnu.org; Sun, 14 Jul 2024 21:02:21 -0400 Original-Received: from mail-pj1-f49.google.com ([209.85.216.49]:59793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTA6c-0007Am-7O for 72117@debbugs.gnu.org; Sun, 14 Jul 2024 21:02:18 -0400 Original-Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2c9e37bdd6fso2819938a91.3 for <72117@debbugs.gnu.org>; Sun, 14 Jul 2024 18:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721005270; x=1721610070; darn=debbugs.gnu.org; h=in-reply-to:from:references:to:content-language:subject :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=1qIjAea+aj5cNIq/TI7s+vf1WW86YhbTb1bkE2yFIDY=; b=eoF9q2gRoSBjpbdwC76fDfIc+UH/M8eQBR/jyOGMS/8n85ZidHH/D+encYvTxjW9Pg bNCm/ml0pGzS3xvNt8VIE17/YRjrG2qDwWjsraGwRgpHquXxeM0Vk8flt/kWs1tt5A1Z eCuCObT0hB8F0fYYfUOsBvp3e9efCkmhkPDlSto0ayfFvXqxfIdgdhfQUld3z9G2AanC ddfP4ThtYC/3JpjSNzvWTfcZ8EZdo/PJ6DtKS22YkOq1EiNb42eSyvOR+DCiGYoFIw1u MRE1zD9jJt1heQhWygD14FIFzq8TSqOGtTPqSd7K/sBn9zuTuZfIlKHO9eFBJG4A/IeJ dfFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721005270; x=1721610070; h=in-reply-to:from:references:to:content-language:subject :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=1qIjAea+aj5cNIq/TI7s+vf1WW86YhbTb1bkE2yFIDY=; b=isOnnk6YFCuhgI8E2FwHEPCWo2efbp0yQHIFFy/V6QsP5rl87zui+GsgD1ZlYkuZV9 nYCuu01y5kV79YL5B8AEv/Jf4bm8c/d07A7Il0mwh10ckl0lqe9H5AdaWl3/GFMcsvzZ C04Atj2dDqQhZdEGYuO+dJCpyrgTxyOJOb+Qwk1icJwsyvM59QWShW0Zi1MioaS0oGy5 Uf9UkAD2cHaSMQLdDjwqQYO7dLyHIn7jq8zdwdMZ01DcPd8+tvjS9kM+EPJRWiKUCchb 1/EMfPQCaJPqxgTg68cTqyM5kaBRctg5oMJcPHQVQKZRXjTJPNOsX/N2PwvO5wApfArQ UOdQ== X-Forwarded-Encrypted: i=1; AJvYcCXlbnD5txymcnOvWzNOV4bsXwRM1ppExnS2usiFAzTOUmedUrXr7h+zv7XspAu7KmgVS77a2uayL83VZp3U/+J39uIGphM= X-Gm-Message-State: AOJu0YwWAynL7KVPkrLNBWvSbJ8Ce3G+B4NgEx6KAGnGUOenXF82PUvX svsBok3hW2n0EDOpX9zYG9gEUOv723pq2BMfrZ8uX/QspMAjAv6O X-Google-Smtp-Source: AGHT+IEgCaIuGBCVHvq+8M0EQzmfbDfXoOU+Mp928EuLG+7NeTjD7cvJW4AYvIfIKmJoBuoJG4n88g== X-Received: by 2002:a17:90a:b395:b0:2c9:8650:404 with SMTP id 98e67ed59e1d1-2ca35d485e4mr14328058a91.30.1721005270395; Sun, 14 Jul 2024 18:01:10 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2cacd2d056bsm5174000a91.1.2024.07.14.18.01.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Jul 2024 18:01:09 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:288852 Archived-At: This is a multi-part message in MIME format. --------------bh6QVydpwijbtCpBMCGQNduj Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/14/2024 12:33 PM, the_wurfkreuz via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > First of all, i can't execute 'sudo lsof | grep delete | head -10' in > eshell. 'sudo -S' should help here: it'll output the sudo password prompt on stderr so that Eshell can see it and handle password entry. (You should be able to enter your password anyway, but without the -S it would just be echoed to the screen.) 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). --------------bh6QVydpwijbtCpBMCGQNduj Content-Type: text/plain; charset=UTF-8; name="0001-Use-kill-process-as-a-fallback-when-a-pipe-gets-brok.patch" Content-Disposition: attachment; filename*0="0001-Use-kill-process-as-a-fallback-when-a-pipe-gets-brok.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSBjYzE4OGM1NmUwYjQzMTNlNTVhZjYwNjgzZjJkMWNmOWM3ZjAwZTFiIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gUG9ydGVyIDxqcG9ydGVyYnVnc0BnbWFpbC5j b20+CkRhdGU6IFN1biwgMTQgSnVsIDIwMjQgMTY6NTE6NDMgLTA3MDAKU3ViamVjdDogW1BB VENIXSBVc2UgJ2tpbGwtcHJvY2VzcycgYXMgYSBmYWxsYmFjayB3aGVuIGEgcGlwZSBnZXRz IGJyb2tlbiBpbgogRXNoZWxsCgpUaGlzIGlzIGJldHRlciB0aGFuICdkZWxldGUtcHJvY2Vz cycgc2luY2UgaXQgd2lsbCBlbnN1cmUgdGhhdCBhbnkKc3RkZXJyIHBpcGUtcHJvY2Vzc2Vz IGdldCBzdG9wcGVkIGFzIHdlbGwgKGJ1ZyM3MjExNykuCgoqIGxpc3AvZXNoZWxsL2VzaC1w cm9jLmVsIChlc2hlbGwtaW5zZXJ0aW9uLWZpbHRlcik6IFVzZSAna2lsbC1wcm9jZXNzJwpp bnN0ZWFkIG9mICdkZWxldGUtcHJvY2VzcycuCi0tLQogbGlzcC9lc2hlbGwvZXNoLXByb2Mu ZWwgfCA0ICsrLS0KIDEgZmlsZSBjaGFuZ2VkLCAyIGluc2VydGlvbnMoKyksIDIgZGVsZXRp b25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9lc2hlbGwvZXNoLXByb2MuZWwgYi9saXNwL2Vz aGVsbC9lc2gtcHJvYy5lbAppbmRleCAwZGNkZjNiYjc2Yy4uY2I1N2JiMzA1Y2MgMTAwNjQ0 Ci0tLSBhL2xpc3AvZXNoZWxsL2VzaC1wcm9jLmVsCisrKyBiL2xpc3AvZXNoZWxsL2VzaC1w cm9jLmVsCkBAIC01MTksNyArNTE5LDcgQEAgZXNoZWxsLWluc2VydGlvbi1maWx0ZXIKICAg ICAgICAgICAgICAgICAgIDs7IGhlcmUuICBIb3dldmVyLCByZW1vdGUgcHJvY2Vzc2VzIGRv bid0IGN1cnJlbnRseQogICAgICAgICAgICAgICAgICAgOzsgc3VwcG9ydCB0aGF0LCBhbmQg bm90IGFsbCBzeXN0ZW1zIGhhdmUgU0lHUElQRSBpbgogICAgICAgICAgICAgICAgICAgOzsg dGhlIGZpcnN0IHBsYWNlIChlLmcuIE1TIFdpbmRvd3MpLiAgSW4gdGhlc2UKLSAgICAgICAg ICAgICAgICAgIDs7IGNhc2VzLCBqdXN0IGRlbGV0ZSB0aGUgcHJvY2VzczsgdGhpcyBpcwor ICAgICAgICAgICAgICAgICAgOzsgY2FzZXMsIGp1c3Qga2lsbCB0aGUgcHJvY2VzczsgdGhp cyBpcwogICAgICAgICAgICAgICAgICAgOzsgcmVhc29uYWJseSBjbG9zZSB0byB0aGUgcmln aHQgYmVoYXZpb3IsIHNpbmNlIHRoZQogICAgICAgICAgICAgICAgICAgOzsgZGVmYXVsdCBh Y3Rpb24gZm9yIFNJR1BJUEUgaXMgdG8gdGVybWluYXRlIHRoZQogICAgICAgICAgICAgICAg ICAgOzsgcHJvY2Vzcy4gIEZvciB1c2UgY2FzZXMgd2hlcmUgU0lHUElQRSBpcyB0cnVseQpA QCAtNTI5LDcgKzUyOSw3IEBAIGVzaGVsbC1pbnNlcnRpb24tZmlsdGVyCiAgICAgICAgICAg ICAgICAgICAoZXNoZWxsLXBpcGUtYnJva2VuCiAgICAgICAgICAgICAgICAgICAgKGlmIChv ciAocHJvY2Vzcy1nZXQgcHJvYyAncmVtb3RlLXBpZCkKICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChlcSBzeXN0ZW0tdHlwZSAnd2luZG93cy1udCkpCi0gICAgICAgICAgICAgICAg ICAgICAgIChkZWxldGUtcHJvY2VzcyBwcm9jKQorICAgICAgICAgICAgICAgICAgICAgICAo a2lsbC1wcm9jZXNzIHByb2MpCiAgICAgICAgICAgICAgICAgICAgICAoc2lnbmFsLXByb2Nl c3MgcHJvYyAnU0lHUElQRSkpKSkpKQogICAgICAgICAgICAgICAgIChwcm9jZXNzLXB1dCBw cm9jIDplc2hlbGwtYnVzeSBuaWwpKSkpKSkKIAotLSAKMi4yNS4xCgo= --------------bh6QVydpwijbtCpBMCGQNduj--