From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiWvg-000790-1e for qemu-devel@nongnu.org; Wed, 04 Jan 2012 14:55:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RiWve-0007Wf-Qc for qemu-devel@nongnu.org; Wed, 04 Jan 2012 14:55:19 -0500 Received: from e36.co.us.ibm.com ([32.97.110.154]:52518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiWve-0007Vt-Hq for qemu-devel@nongnu.org; Wed, 04 Jan 2012 14:55:18 -0500 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Jan 2012 12:55:16 -0700 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q04Jt84Q159976 for ; Wed, 4 Jan 2012 12:55:08 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q04Jt76s020334 for ; Wed, 4 Jan 2012 12:55:07 -0700 Message-ID: <4F04AE99.9030806@linux.vnet.ibm.com> Date: Wed, 04 Jan 2012 13:55:05 -0600 From: Michael Roth MIME-Version: 1.0 References: <1325706313-21936-1-git-send-email-lcapitulino@redhat.com> <1325706313-21936-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1325706313-21936-2-git-send-email-lcapitulino@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-ga: set O_NONBLOCK for serial channels List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: amit.shah@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org On 01/04/2012 01:45 PM, Luiz Capitulino wrote: > This fixes a bug when using -m isa-serial where qemu-ga will > hang on a read()'s when communicating to the host via isa-serial. > > Original fix by Michael Roth. > > Signed-off-by: Luiz Capitulino > --- > qemu-ga.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/qemu-ga.c b/qemu-ga.c > index 200bb15..98e4dfe 100644 > --- a/qemu-ga.c > +++ b/qemu-ga.c > @@ -504,7 +504,7 @@ static void init_guest_agent(GAState *s) > exit(EXIT_FAILURE); > } > } else if (strcmp(s->method, "isa-serial") == 0) { > - fd = qemu_open(s->path, O_RDWR | O_NOCTTY); > + fd = qemu_open(s->path, O_RDWR | O_NOCTTY | O_NONBLOCK); > if (fd == -1) { > g_critical("error opening channel: %s", strerror(errno)); > exit(EXIT_FAILURE); Thanks for sending this. Reviewed-by: Michael Roth