diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 811acb965..873e11986 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-03-04 Pierre Humblet + + * fhandler_socket.cc (fhandler_socket::ioctl): Only cancel + WSAAsyncSelect when async mode is on. + 2005-03-03 Corinna Vinschen * cygwin.din (utmpxname): Export. diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index ee93ff517..b7983a1f4 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -1594,7 +1594,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p) /* We must cancel WSAAsyncSelect (if any) before setting socket to * blocking mode */ - if (cmd == FIONBIO && *(int *) p == 0) + if (cmd == FIONBIO && async_io () && *(int *) p == 0) WSAAsyncSelect (get_socket (), winmsg, 0, 0); res = ioctlsocket (get_socket (), cmd, (unsigned long *) p); if (res == SOCKET_ERROR)