www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
From: | patl AT cag DOT lcs DOT mit DOT edu (Patrick J. LoPresti) |
To: | cygwin AT sourceware DOT cygnus DOT com |
Subject: | Observations on select.cc (19990922 snapshot) |
Date: | 24 Sep 1999 16:40:20 -0400 |
Message-ID: | <s5gvh909h6z.fsf@egghead.curl.com> |
Lines: | 24 |
Just some observations from reading the code and playing with strace. Pull up select.cc and follow along. The peek_pipe() function frequently gets called on the input side of a pipe. That causes the call to PeekNamedPipe() to fail with a permission error (Win32 only lets you peek at the output side), which is kind of annoying. Perhaps peek_pipe() could check read_selected before doing the PeekNamedPipe? Also, there currently seem to be only clunky attempts to enforce the invariant that the bits set in the fd_sets when select() returns are subsets of the bits which were passed in. (I'm not even certain this is always true.) Wouldn't it make sense for the set_bits() function to enforce this invariant by checking {read,write,except}_selected before setting the corresponding bit? Then many of the read_selected tests around the file could be removed. By the way, I am not asking anyone else to do this work (unless they want to). I just want to confirm with the developers that these are reasonable things to do before I bother... Thanks! - Pat -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |