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#55590: 29.0.50; Eshell subcommands clobber pipelines and produce incorrect output Date: Sun, 22 May 2022 20:34:57 -0700 Message-ID: <6cc569a4-3512-d546-3f39-76f3d61436ac@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21873"; mail-complaints-to="usenet@ciao.gmane.io" To: 55590@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 23 05: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 1nsyrc-0005Zq-G3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 May 2022 05:36:12 +0200 Original-Received: from localhost ([::1]:55690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsyrb-0004BA-3T for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 May 2022 23:36:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsyrS-0004B2-Hf for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 23:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nsyrS-00016V-7S for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 23:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nsyrR-0007mO-Vi for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 23:36:01 -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, 23 May 2022 03:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55590 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165327690329823 (code B ref -1); Mon, 23 May 2022 03:36:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 May 2022 03:35:03 +0000 Original-Received: from localhost ([127.0.0.1]:46793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsyqV-0007kv-2S for submit@debbugs.gnu.org; Sun, 22 May 2022 23:35:03 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsyqT-0007kn-S0 for submit@debbugs.gnu.org; Sun, 22 May 2022 23:35:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsyqT-0003hl-M9 for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 23:35:01 -0400 Original-Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:44580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nsyqR-0000em-Ut for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 23:35:01 -0400 Original-Received: by mail-pg1-x52d.google.com with SMTP id v10so12557498pgl.11 for ; Sun, 22 May 2022 20:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:subject:to:message-id:date:mime-version:content-language :content-transfer-encoding; bh=d3niCdxi+cFmV0C5EygKLVztfQ8mhaV9KIpOE73flVk=; b=OIsr6X8bEcfHRg2M4VO5zT4cZ24s84rnbTSgNg+do9iirRCZjSkIQH+drTth+CQ4Tf KdeJvvBjo72HZCka4PHo0TKk7quAQjEgG4Jhsf1bEy+CBHnZJJj4G+p6QyMjwMw27Xvq c0GnROBHq+6rj8sJTrN0MeZczmeW0tS33NfsxagBg/VfHtfghz/EY0B/WGw4WZvuqFoh h0JjBWBXQjp7vIwgnMFGuJ6THghmhMxV5bhANY2WMspwD2FQBwX8/WqHIn13j2jsHT+f Rqz5SSkb5fS3EZQtZQzdPI5C0YxOR+a4nyR1EfAcSMa9zhb6tjJubAo4AA9n9UpUfnl6 pCsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:subject:to:message-id:date:mime-version :content-language:content-transfer-encoding; bh=d3niCdxi+cFmV0C5EygKLVztfQ8mhaV9KIpOE73flVk=; b=ZT+wEWVRqPRRLeEqUK8ywoWlDzbMWCYLFmPxbnLDw0wmvu3hPq8xhG3sA1HdSGybWe VPX2J7sZ3vLRSmjAPA0JqYmb1VDdsHjVxSvL2QOBnX2Mgarlp6+GWxbHP5eztC+HFJZZ 3HLDfChswM+Smn7wrRM7bNBhLQgYy2B8M3stf7fKKkt5hS7PnMnjGSaoD5RbcXb7qT+W hbNWSTdjFH4oJyPkuPhWb/xABvvERcH7Hdq7j4/RjBrfEQ2+4TJ5AxNiEhZA/xrH7oKw +09oQJr7MnbE8L9g4mR04BcUjg80omK+BOF8wBUdBg6XkHBxfn4otHeFO1qJs9sU2JXJ 9lEQ== X-Gm-Message-State: AOAM530hLxoRBfBgcE0jj2UWE3pPs/MxmLW+xuH7/rdZsAdplvt6kbnP t+MjiaKK23Jluen00sSBeOL9lroriLw= X-Google-Smtp-Source: ABdhPJyfDGvHa9hmJUiaI7Uu7XC1p1wlBDOOo4knluxCrD6d4JWbrlNYg1HL1SnAfkoJRH4h7qiW/Q== X-Received: by 2002:a05:6a00:1a08:b0:510:a1db:1a91 with SMTP id g8-20020a056a001a0800b00510a1db1a91mr21593577pfv.69.1653276898174; Sun, 22 May 2022 20:34:58 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id f18-20020aa79692000000b00512d13016d0sm5921030pfk.159.2022.05.22.20.34.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 May 2022 20:34:57 -0700 (PDT) X-Mozilla-News-Host: news://news.gmane.org:119 Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=jporterbugs@gmail.com; helo=mail-pg1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:232926 Archived-At: Starting from `emacs -Q -f eshell', enter the following command: echo ${*echo hi} | rev The output is: ~ $ ih That is, the output of the command ended up *after* the prompt, when it should be before. This usually happens in cases where Eshell thinks all the subprocesses in a command have finished, but there's actually one still running. In this case, it's because the ${SUBCOMMAND} clobbers the headproc/tailproc values being recorded for the (outer) pipeline. Both the top-level command and the subcommand call `eshell-execute-pipeline', and the function isn't properly reentrant. Patch forthcoming momentarily. I'm just getting a bug number first.