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

zpty -r and pipes



$ 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


Sounds like some bug in fd management.

$ zsh --version
zsh 5.0.2 (x86_64-unknown-linux-gnu)

-- 
Stephane



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