From: Paolo Bonzini <pbonzini@redhat.com>
To: Andrew Baumann <Andrew.Baumann@microsoft.com>,
"Daniel P. Berrange" <berrange@redhat.com>
Cc: Stefan Weil <sw@weilnetz.de>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] broken socket events on win32 qemu
Date: Mon, 7 Mar 2016 09:24:29 +0100 [thread overview]
Message-ID: <56DD3ABD.4060507@redhat.com> (raw)
In-Reply-To: <BLUPR0301MB203444C583148B03DED505129EB10@BLUPR0301MB2034.namprd03.prod.outlook.com>
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():
>
> -#ifdef _WIN32
> - chan = g_io_channel_win32_new_socket(fd);
> -#else
> - chan = g_io_channel_unix_new(fd);
> -#endif
>
> ... 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
next prev parent reply other threads:[~2016-03-07 8:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 7:23 [Qemu-devel] broken socket events on win32 qemu Andrew Baumann
2016-03-07 8:24 ` Paolo Bonzini [this message]
2016-03-07 10:19 ` Daniel P. Berrange
2016-03-07 12:45 ` Paolo Bonzini
2016-03-07 18:23 ` Andrew Baumann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56DD3ABD.4060507@redhat.com \
--to=pbonzini@redhat.com \
--cc=Andrew.Baumann@microsoft.com \
--cc=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).