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]

RE: src questions, test cases?


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".


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