From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn9AJ-00029n-D2 for qemu-devel@nongnu.org; Tue, 17 Jan 2012 08:33:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rn9AB-0002iu-Ri for qemu-devel@nongnu.org; Tue, 17 Jan 2012 08:33:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn9AB-0002ip-I4 for qemu-devel@nongnu.org; Tue, 17 Jan 2012 08:33:23 -0500 Message-ID: <4F15789D.7000708@redhat.com> Date: Tue, 17 Jan 2012 14:33:17 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1326479558-3016-1-git-send-email-aliguori@us.ibm.com> <1326479558-3016-3-git-send-email-aliguori@us.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/6] qtest: add C version of test infrastructure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , qemu-devel@nongnu.org, Stefan Hajnoczi 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. Paolo