All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] libxl: prevent xl from running if xend	is running.
Date: Tue, 24 Apr 2012 18:58:17 +0100	[thread overview]
Message-ID: <4F96E9B9.6080407@citrix.com> (raw)
In-Reply-To: <1335279579.4347.191.camel@zakaz.uk.xensource.com>

Ian Campbell escribió:
> 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.
>

What have we decided at the end? Should I do an inverse check, and run 
only if access(...) != 0 && errno == ENOENT?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2012-04-24 17:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23 15:11 [PATCH] libxl: prevent xl from running if xend is running Roger Pau Monne
2012-04-23 15:26 ` Ian Campbell
2012-04-24 13:18   ` Ian Jackson
2012-04-24 13:17 ` Ian Jackson
2012-04-24 13:30   ` Ian Campbell
2012-04-24 13:34     ` Ian Jackson
2012-04-24 14:40       ` Ian Campbell
2012-04-24 14:47         ` Ian Jackson
2012-04-24 14:59           ` Ian Campbell
2012-04-24 17:58             ` Roger Pau Monne [this message]
2012-04-24 18:00               ` Ian Jackson
2012-04-24 17:07       ` Roger Pau Monne
2012-04-24 17:10         ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F96E9B9.6080407@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.