Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PATCH: ptyread eating CPU on Cygwin
- X-seq: zsh-workers 13039
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: PATCH: ptyread eating CPU on Cygwin
- Date: Thu, 19 Oct 2000 13:49:03 +0400
- Importance: Normal
- In-reply-to: <200010190845.KAA15888@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> This also changes comptest and nslookup to use `zpty -b' to get
> blocking IO on the pty. Hm, should blocking be the default and -b
> select non-blocking behaviour?
>
Yes, I'd say. I've tried to find reasonable usage for non-blocking mode and
failed. Consider "zpty -r foo bar pat" in non-blocking mode. It reads whatever
was available and returns error code if it did not match. So, what can program
now do with 'bar' content? Request additional read? That returns us to the
same busy loop problem. Or just through away. (This was discussed when zpty
was born).
So I suggest adding "read-with-timeout" possibilty, and making blocking read
default. It is also useful to distinguish between EOF and timeout with
different return code.
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author