From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8479 invoked from network); 19 Oct 2000 09:49:12 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Oct 2000 09:49:12 -0000 Received: (qmail 28365 invoked by alias); 19 Oct 2000 09:49:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13039 Received: (qmail 28356 invoked from network); 19 Oct 2000 09:49:07 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: Subject: RE: PATCH: ptyread eating CPU on Cygwin Date: Thu, 19 Oct 2000 13:49:03 +0400 Message-ID: <001501c039b1$d0ab8470$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <200010190845.KAA15888@beta.informatik.hu-berlin.de> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 > 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