aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/net.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-10-22 16:02:15 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-10-22 16:02:15 +0000
commitc2c020d1fb082baff8dfd2f2ca93c66bf7151bd0 (patch)
tree8f5d7adb2cb402b5131cee69dd0a34049e75002f /winsup/cygwin/net.cc
parent152a9caf58265c5a966f978df1ef4f8adbd2543c (diff)
downloadnewlib-c2c020d1fb082baff8dfd2f2ca93c66bf7151bd0.zip
newlib-c2c020d1fb082baff8dfd2f2ca93c66bf7151bd0.tar.gz
newlib-c2c020d1fb082baff8dfd2f2ca93c66bf7151bd0.tar.bz2
* 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.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc14
1 files changed, 1 insertions, 13 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index eccf063..456da37 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;