It is calling recv() on a socket that was previously:
- set to blocking with a WS_ioctlsock() call with cmd WS_FIONBIO
- AsyncSelect()'ed that should make the socket non-blocking.
(snip)
while the second does not touch the unix fd. This leaves the unix file descriptor in the blocking state and the unix recvmsg() call will not terminate.
I thought the unix file descriptor should always by non-blocking, but it is a while since I was looking at socket code.
No, it's possible to make blocking socket calls in Windows too. If you've left a socket in blocking mode, and call one of the blocking Winsock functions, like send() or recv(), Wine will call a Unix library function, like sendmsg() or recvmsg(), that will block too.
Is what I think correct, and should the fcntl()'s simply go. Or should AsyncSelect() set the unix fd to non blocking instead?
I guess you need tests to confirm that calling WSAAsyncSelect causes a socket to become nonblocking.. --Juan