From: Ian Campbell Subject: Re: [PATCH] libxl: prevent xl from running if xend is running. Date: Tue, 24 Apr 2012 15:59:39 +0100 Message-ID: <1335279579.4347.191.camel@zakaz.uk.xensource.com> References: <1335193862-37069-1-git-send-email-roger.pau@citrix.com> <20374.42987.732159.638716@mariner.uk.xensource.com> <1335274224.4347.138.camel@zakaz.uk.xensource.com> <20374.43998.471725.415493@mariner.uk.xensource.com> <1335278440.4347.180.camel@zakaz.uk.xensource.com> <20374.48381.57194.304369@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20374.48381.57194.304369@mariner.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 Jackson Cc: George Dunlap , "xen-devel@lists.xen.org" , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org On Tue, 2012-04-24 at 15:47 +0100, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxl: prevent xl from running if xend is running."): > > You could consider this to be a best effort check for xend. IOW we try > > and look but if we can't tell then we assume it is not. > > I guess. > > > It's not terribly robust to just blunder on, but on the other hand being > > more robust has a bigger risk of false positives, e.g. failing to start > > xl because /var/lock/subsys/ does not exist isn't especially helpful > > either (the EACCESS return code doesn't distinguish that > > from /var/lock/subsys/xend not existing). > > EACCES would happen only if the permissions prevented us from > looking. If /var/lock/subsys doesn't exist we'll get ENOENT, the > "good" error return. Oh, right. Well, not starting because the perms on /var/lock/subsys are too tight (e.g. selinux restricting it to initscripts only? unrealistic maybe) seems unhelpful too. (I admit this isn't as compelling as my previous example). Ian.