* 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

@ -1236,8 +1236,7 @@ fhandler_socket::accept4 (struct sockaddr *peer, int *len, int flags)
}
}
}
sock->set_nonblocking (flags & SOCK_NONBLOCK
? true : is_nonblocking ());
sock->set_nonblocking (flags & SOCK_NONBLOCK);
if (flags & SOCK_CLOEXEC)
sock->set_close_on_exec (true);
/* No locking necessary at this point. */