From: Ian Jackson Subject: Re: [PATCH] libxl_qmp: Handle unexpected end-of-socket Date: Mon, 20 Feb 2012 17:09:35 +0000 Message-ID: <20290.32335.668762.730080@mariner.uk.xensource.com> References: <1326987322-28007-1-git-send-email-anthony.perard@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1326987322-28007-1-git-send-email-anthony.perard@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Anthony PERARD Cc: Xen Devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Anthony PERARD writes ("[Xen-devel] [PATCH] libxl_qmp: Handle unexpected end-of-socket"): > When read() return 0, the current code just tries again. But this leads to an > infinite loop if QEMU died too soon. Right. > Also, retry select if a signal was caught. Why add another goto ? I think these goto-based loops are a bad idea, really. > + if (errno == EINTR) > + goto do_select_again; I think this could be "continue". Do you agree. Thanks, Ian.