Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zpty -r and pipes
On Mon, 13 May 2013 16:27:20 +0100
Stephane Chazelas <stephane.chazelas@xxxxxxxxx> wrote:
> $ zsh -c 'zmodload zsh/zpty; zpty E echo test; zpty -r E'
> test
>
> But if I pipe it to anything:
>
> $ zsh -c 'zmodload zsh/zpty; zpty E echo test; zpty -r E | cat'
> $
>
> No output.
>
> Those are fine though:
>
> $ zsh -c 'zmodload zsh/zpty; zpty E echo test; echo $(zpty -r E)'
> test
> $ zsh -c 'zmodload zsh/zpty; zpty E echo test; {zpty -r E} | cat'
> test
First guess and without looking into it is it might be a job control
thing. Those look just the circumstances where we wouldn't have a
special job in a subshell (pipeline) or where we would (command
substitution, new current-shell process before the fork).
But I could just be wasting typing time.
Not sure what this has got to do with file descriptors anyway.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author