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

Blocking zpty once again



 at one point while trying the changes below one of the zsh
> running inside zpty exited prematurely, and the result was that comptest
> locked up and had to be killed.  I didn't know how long to wait before
> giving up on it.
>

Yes. Playing with zpty I found, that there is no way to kill zpty read. I
tried

zpty -r cmd foo pat

with wrong (as it turned out) pattern. It was in interactive shell, and
neither of ^C, ^\, ^Z helped.

Exactly for this reason we need either read with timeout or general purpose
select (nice to have independently of zpty).

Also, I'm not sure what happens when child exits. I tried something simple
as

zsh cat cat /etc/profile
zsh -r cat

but got nothing. Looks like pty was flushed in this case. Child did not
exist anymore, but zsh still insisted on valid `cat' handle. I'd expect it
to detect dead pty - not sure, how to do it in general case.

/andrej



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