Subject: bug#12689: 24.2; Eshell ${cmd} substitution

From: Samer Masterson <[email-masked]>
Date: Thu, 05 Mar 2015 02:34:00 -0800

On Wed, Mar 4, 2015 at 9:38 AM, Eli Zaretskii <[email-masked]> wrote:
> eshell-execute-pipeline was what I had in mind.
> 
> It's been a while since I last hacked Eshell, so perhaps that was a
> stupid question, but what prompted it was the fact that your change
> would wait until a process exited under some conditions, so I wondered
> whether it will prevent Eshell from firing up several asynchronous
> processes connected through a pipe.

Oh, I see what you're saying. My confusion came from not knowing that 
piped programs executed in parallel in traditional shells.
> 
> Not sure why you intersperse internal and external echo, or why did
> you use echo to begin with.
I thought the external echos would race and output out-of-order, but 
they just cut off after the first external echo.
> I'd rather see that a pipe that does make sense, something like
> 
>   cat some-large-file | wc
> 
> with external commands works as expected, and both programs run
> simultaneously in parallel (e.g., according to 'top' or a similar
> tool), not sequentially.
The following command

~$ sleep 1 | sleep 1 | sleep 1

runs in 1 second without my patch and 3 with it (which doesn't conform 
with Bash). Also

~$ cat any-file | wc

never returns with my patch. Thanks for catching these errors, and I'll 
ping this bug report when my new patch is ready.
-s