* 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:
@ -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;
|
||||
|
Reference in New Issue
Block a user