This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
[Patch]: fhandler_socket::ioctl
- From: "Pierre A. Humblet" <pierre at phumblet dot no-ip dot org>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 03 Mar 2005 23:36:58 -0500
- Subject: [Patch]: fhandler_socket::ioctl
This patch avoids the unnecessary creation of the win thread in window.cc
It fails to create the invisible window (error 5) when running exim
as a service under a privileged non SYSTEM account (XP home, SP 2).
Pierre
2005-03-04 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_socket.cc (fhandler_socket::ioctl): Only cancel
WSAAsyncSelect when async mode is on.
Index: fhandler_socket.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_socket.cc,v
retrieving revision 1.150
diff -u -p -r1.150 fhandler_socket.cc
--- fhandler_socket.cc 28 Feb 2005 13:11:49 -0000 1.150
+++ fhandler_socket.cc 4 Mar 2005 00:32:57 -0000
@@ -1594,7 +1594,7 @@ fhandler_socket::ioctl (unsigned int cmd
/* 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)