From c2c020d1fb082baff8dfd2f2ca93c66bf7151bd0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 22 Oct 2005 16:02:15 +0000 Subject: * fhandler_socket.cc (fhandler_socket::connect): Don't restrict WSAEINVAL -> WSAEISCONN conversion to nonblocking sockets. (fhandler_socket::accept): Use event driven technique to implement interuptible accept. (fhandler_socket::wait): Allow FD_ACCEPT handling. * net.cc (cygwin_accept): Remove workaround for allowing blocking accept. That's entirely in fhandler_socket::accept now. --- winsup/cygwin/net.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'winsup/cygwin/net.cc') diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index eccf0635f..456da37e2 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -909,19 +909,7 @@ cygwin_accept (int fd, struct sockaddr *peer, int *len) if (efault.faulted (EFAULT) || !fh) res = -1; else - { - if (!fh->is_nonblocking ()) - { - size_t fds_size = howmany (fd + 1, NFDBITS) * sizeof (fd_mask); - fd_set *read_fds = (fd_set *) alloca (fds_size); - memset (read_fds, 0, fds_size); - FD_SET (fd, read_fds); - res = cygwin_select (fd + 1, read_fds, NULL, NULL, NULL); - if (res == -1) - return -1; - } - res = fh->accept (peer, len); - } + res = fh->accept (peer, len); syscall_printf ("%d = accept (%d, %p, %p)", res, fd, peer, len); return res; -- cgit v1.2.3