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

Re: PATCH: ptyread eating CPU on Cygwin



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   



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