From: Ian Jackson Subject: Re: [PATCH 16/20] libxl: event API: new facilities for waiting for subprocesses Date: Wed, 21 Mar 2012 11:26:00 +0000 Message-ID: <20329.47816.267214.553045@mariner.uk.xensource.com> References: <1331915215-10477-1-git-send-email-ian.jackson@eu.citrix.com> <1331915215-10477-17-git-send-email-ian.jackson@eu.citrix.com> <1332247644.9223.258.camel@zakaz.uk.xensource.com> <20328.48471.947320.515103@mariner.uk.xensource.com> <1332265152.9223.376.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1332265152.9223.376.camel@zakaz.uk.xensource.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 Campbell Cc: Roger Pau Monne , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [Xen-devel] [PATCH 16/20] libxl: event API: new facilities for waiting for subprocesses"): > On Tue, 2012-03-20 at 17:24 +0000, Ian Jackson wrote: > > If this loop has to go round again, it means we have had 256 > > wakeup events of some kind. I don't think this is really an > > efficiency concern and it makes the code simpler not to have to worry > > about it. > > My concern is that we would exit the loop _without_ going round again > because if r == 256 then also r>= 0 and we return i.e. we don't actually > "eatall" the buffer, or does that not matter? So the fd stays readable and we will go round the event loop to read it again. Evidently this is too confusing, though, so I'll just make the function really eat all. > > > ERROR_NOT_READY seems like an odd name. ERROR_UNKNOWN_CHILD perhaps? > > > > I was reusing an existing error code. Do you think it should have its > > own ? > > You once told me we shouldn't be shy about adding error codes for > specific things.. OK, I'll add one. Also I notice that I actually ignore the return value from reaped_callback which is not right. So I will fix that too. Thanks, Ian.