Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 5.6 regression: a pipe sometimes yields a TTOU signal



On Thu, 6 Sep 2018 14:36:57 +0200
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> Perhaps I misunderstood. The solution is not something like
> 
>   echo | { ( sww ) | less }
> 
> but
> 
>   echo | ( sww | less )

Yes, that's what I meant.

In the first example there are still Rimmerworld(*) pipelines:
"echo | ... " and "(sww) | less" are two different pipelines
being managed in the same shell.  This is the root of the
problem, with various ramifications.

In the second case, "echo | ..." is in one shell, and then
"sww | less" is managed entirely by a forked copy of the shell,
so the basic issue doesn't occur.

In principle (and depending a bit on options, open FDs, etc.)
the second one should be just as efficient --- the fork occurs
earlier but the "less" is run by an exec of the forked shell.

pws

(*) https://www.youtube.com/watch?v=py3u3P9OpBE
OK, the actual relevance *is* a bit obscure.



Messages sorted by: Reverse Date, Date, Thread, Author