From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13730 invoked from network); 18 Oct 2000 16:05:31 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Oct 2000 16:05:31 -0000 Received: (qmail 14217 invoked by alias); 18 Oct 2000 16:05:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13028 Received: (qmail 14209 invoked from network); 18 Oct 2000 16:05:24 -0000 From: "Bart Schaefer" Message-Id: <1001018155547.ZM4463@candle.brasslantern.com> Date: Wed, 18 Oct 2000 15:55:47 +0000 In-Reply-To: <001301c038f6$e114c940$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "PATCH: ptyread eating CPU on Cygwin" (Oct 18, 3:30pm) References: <001301c038f6$e114c940$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrej Borsenkow" , "Zsh hackers list" Subject: Re: PATCH: ptyread eating CPU on Cygwin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 18, 3:30pm, Andrej Borsenkow wrote: } } O.K., this is very simple patch that makes ptyread use select. Sven, } could you look at conditions there? I'm not Sven, but HAVE_SELECT does not imply having FD_ZERO or an fd_set typedef. On the other hand, I've just noticed that other code assumes in several places that it does imply those things, so it's probably OK. However, using a NULL timeout structure in the select() call has turned a non-blocking read into a fully blocking one. If you're going to do that, you might as well throw out the select() call and just set the descriptor back to blocking state before calling read(). I suspect there's a good reason it was a non-blocking read in the first place, though. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net