This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Observations on select.cc (19990922 snapshot)


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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]