From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH] ms-queuedaemon: Do not spin if client input is delayed/truncated Date: Wed, 21 Oct 2015 09:53:39 +0100 Message-ID: <1445417619.9563.46.camel@citrix.com> References: <1445362001-32521-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zop9X-0002Ke-9x for xen-devel@lists.xenproject.org; Wed, 21 Oct 2015 08:53:47 +0000 In-Reply-To: <1445362001-32521-1-git-send-email-ian.jackson@eu.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: Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Tue, 2015-10-20 at 18:26 +0100, Ian Jackson wrote: > chan-read-data would spin if `read' returns early because of > nonblocking mode. > > Check whether the return value is the empty string (which can only > happen on eof or nonblocking lack of data, and we checked eof just > before), and if so, simply return. The fileevent remains set up so we > will be called again when more data arrives. > > (Deployment/testing note: this change is currently live in Cambridge, > as I cowboyed it directly into ~osstest/daemons-testing.git, on > observing this misbehaviour.) > > Signed-off-by: Ian Jackson Acked-by: Ian Campbell