[PATCH] interruptable accept

Corinna Vinschen cygwin-patches@cygwin.com
Mon Jul 1 05:10:00 GMT 2002


On Mon, Jul 01, 2002 at 01:59:56PM +0200, Thomas Pfaff wrote:
> To be corect:
> 1. Call WSAEventSelect.
> 2. WSAWaitForMultipleObjects for socket and signal_arrived.
> 3. If signal arrived set EINTR, WSAEnumNetworkEvents otherwise.
> 4. do accept, then switch sockets back to nonblocking
> 
> I will generate a new patch tonight, then you can decide which one to use.
> The select one was easier one to implement because you don't have to
> deal with nonblocking I/O and multiple events.

If that helps, look into net.cc, wsock_event::wait().  It's doing
something similar for send/recv.

Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.



More information about the Cygwin-patches mailing list