src questions, test cases?

Sergey Okhapkin sos@prospect.com.ru
Tue Oct 21 23:29:00 GMT 1997


Tim Newsham wrote:
>
>
> I have a couple of questions about cygwin.dll (winsup) src:
>
>  - why does select iterate over all the file descriptors instead
>    of just the ones set in the bit vectors?

Select iterates over first n (the first argument of select) file 
descriptors set in one of fd_set masks.

>
>  - why does select open up a stream socket after firing off the
>    select thread?

To force select thread to exit by closing this socket when an event occured 
on non-socket handle.

>
>  - Couldn't asynchronous operations be used to select on sockets
>    instead of firing off a seperate thread?

This case we must create a thread with a window to wait for socket events. 
Also, WSAAsyncSelect automatically sets the socket unblocked, so we'll need 
to care about. More harmness than goodness... Using winsock 2 instead of 
winsock 1.1 will be more suitable with cygwin needs, but Windows 95 doesn't 
have built in support for ws 2.

>
>  - Is there any way of asynchronously checking for data on a pipe?

No way for anonymous pipes :-( My additions to b18 select() makes a polling 
select on pipes with 10ms interval. *sigh*

--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list