* fhandler_socket.cc (fhandler_socket::accept4): Set nonblocking

flag exactly according to flags, as on Linux.
	* net.cc (cygwin_accept): Maintain BSD semantics here.
This commit is contained in:
Corinna Vinschen
2010-01-15 21:34:27 +00:00
parent be0ca195b9
commit 9d5bf1b13c
3 changed files with 8 additions and 3 deletions

View File

@ -1256,7 +1256,7 @@ cygwin_accept (int fd, struct sockaddr *peer, socklen_t *len)
if (efault.faulted (EFAULT) || !fh)
res = -1;
else
res = fh->accept4 (peer, len, 0);
res = fh->accept4 (peer, len, fh->is_nonblocking () ? SOCK_NONBLOCK : 0);
syscall_printf ("%d = accept (%d, %p, %p)", res, fd, peer, len);
return res;