dlls/ws2_32/tests/sock.c:event_client:597:
/* Prepare event notification for connect, makes socket nonblocking */ event = WSACreateEvent (); WSAEventSelect ( mem->s, event, FD_CONNECT ); tmp = connect ( mem->s, (struct sockaddr*) &mem->addr, sizeof ( mem->addr ) ); if ( tmp != 0 && ( err = WSAGetLastError () ) != WSAEWOULDBLOCK ) ok ( 0, "event_client (%x): connect error: %d\n", id, err ); tmp = WaitForSingleObject ( event, INFINITE );
When dlls/ws2_32/socket.c:WS_connect returns 0 (because unix connect returns 0) no FD_CONNECT event is ever generated and the call on the last line above never returns. So who's wrong, the test case or WS_connect?