Subject: bug#55590: 29.0.50; Eshell subcommands clobber pipelines and produce incorrect output

From: Jim Porter <[email-masked]>
Date: Sun, 22 May 2022 20:34:57 -0700

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.