From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acqSz-0000rh-On for qemu-devel@nongnu.org; Mon, 07 Mar 2016 03:24:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acqSw-0003Ty-J8 for qemu-devel@nongnu.org; Mon, 07 Mar 2016 03:24:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acqSw-0003Tp-Dh for qemu-devel@nongnu.org; Mon, 07 Mar 2016 03:24:34 -0500 References: From: Paolo Bonzini Message-ID: <56DD3ABD.4060507@redhat.com> Date: Mon, 7 Mar 2016 09:24:29 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] broken socket events on win32 qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Baumann , "Daniel P. Berrange" Cc: Stefan Weil , QEMU Developers On 07/03/2016 08:23, Andrew Baumann wrote: > Without having looked very closely at the code, I suspect the problem > may be that we've lost the special-case treatment of socket handles as > distinct from file descriptors on Win32 (they are different namespaces, > and different APIs are needed). The previous version of qemu-char.c > special-cased sockets in io_channel_from_socket(): >=20 > -#ifdef _WIN32 > - chan =3D g_io_channel_win32_new_socket(fd); > -#else > - chan =3D g_io_channel_unix_new(fd); > -#endif >=20 > ... but I don't see anything equivalent in io/channel-socket.c. Am I > looking in the wrong place? You're right, we need to add a qio_channel_create_socket_watch, which just calls qio_channel_create_fd_watch on Unix but uses select and WSAEnumNetworkEvents on Win32. I have already implemented this trick in aio-win32.c for networked block devices. Andrew or Daniel, it would be great if you added a failing testcase to test-io-channel-socket.c. I can work on the fix myself. Paolo