[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 13/21] char: ensure listener socket is in blo
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v1 13/21] char: ensure listener socket is in blocking mode when waiting |
Date: |
Wed, 9 Mar 2016 18:48:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 09/03/2016 18:28, Daniel P. Berrange wrote:
> When the network chardev is configured with 'server' and 'wait'
> options, QEMU must block startup until the first client connects
> to the server. This implies that the listener socket must be in
> blocking mode. Unfortnantely on Win32 the socket is initially
> in non-blocking mode, so we're not waiting for the first client.
Shall we set the blocking/non-blocking mode uniformly for all platforms?
Or is that something has created a GSource and this put the socket in
non-blocking mode?
Paolo
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> qemu-char.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/qemu-char.c b/qemu-char.c
> index e0147f3..18890f7 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -4376,6 +4376,7 @@ static CharDriverState *qmp_chardev_open_socket(const
> char *id,
> if (is_listen && is_waitconnect) {
> fprintf(stderr, "QEMU waiting for connection on: %s\n",
> chr->filename);
> + qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), true, NULL);
> tcp_chr_accept(QIO_CHANNEL(s->listen_ioc), G_IO_IN, chr);
> qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), false, NULL);
> }
>
[Qemu-devel] [PATCH v1 14/21] char: remove qemu_chr_finish_socket_connection method, Daniel P. Berrange, 2016/03/09
[Qemu-devel] [PATCH v1 13/21] char: ensure listener socket is in blocking mode when waiting, Daniel P. Berrange, 2016/03/09
- Re: [Qemu-devel] [PATCH v1 13/21] char: ensure listener socket is in blocking mode when waiting,
Paolo Bonzini <=
[Qemu-devel] [PATCH v1 15/21] char: remove socket_try_connect method, Daniel P. Berrange, 2016/03/09
[Qemu-devel] [PATCH v1 17/21] osdep: add wrappers for socket functions, Daniel P. Berrange, 2016/03/09
[Qemu-devel] [PATCH v1 16/21] char: remove qemu_chr_open_socket_fd method, Daniel P. Berrange, 2016/03/09
[Qemu-devel] [PATCH v1 19/21] osdep: remove use of socket_error() from all code, Daniel P. Berrange, 2016/03/09
[Qemu-devel] [PATCH v1 18/21] osdep: remove use of Win32 specific closesocket/ioctlsocket, Daniel P. Berrange, 2016/03/09