From f317a917bc7e669a130893db5dc32a7d620662ad Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 4 Mar 2005 08:36:43 +0000 Subject: [PATCH] * fhandler_socket.cc (fhandler_socket::ioctl): Only cancel WSAAsyncSelect when async mode is on. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_socket.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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) -- 2.43.5