qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/6] qtest: add C version of test infrastructure


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 3/6] qtest: add C version of test infrastructure
Date: Tue, 17 Jan 2012 13:39:35 +0000

On Tue, Jan 17, 2012 at 1:33 PM, Paolo Bonzini <address@hidden> wrote:
> On 01/17/2012 12:33 PM, Stefan Hajnoczi wrote:
>>
>> I was wondering about a qemu-side solution where a closed qtest socket
>> means we need to shut down, but am not sure if the chardev code lets
>> us do that.  (Really we want POLLHUP but we only seem to have
>> POLLIN/POLLOUT handlers.)
>
>
> For poll, both POLLIN and POLLOUT are always reported together with POLLHUP.
>  I think the same happens with select().  If you get a zero-read in the
> qtest chardev handler you can shut down.

There is already open/closed logic in qemu-char.c that acts on
select(2) becoming readable.  However, it isn't kicking in - we're
still ending up in send_all(), which should only be called when we
thing the socket is connected.  I'll investigate some more.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]