From: Ian Jackson Subject: Re: [PATCH] libxl: prevent xl from running if xend is running. Date: Tue, 24 Apr 2012 14:17:31 +0100 Message-ID: <20374.42987.732159.638716@mariner.uk.xensource.com> References: <1335193862-37069-1-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1335193862-37069-1-git-send-email-roger.pau@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: Roger Pau Monne Cc: george.dunlap@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Roger Pau Monne writes ("[Xen-devel] [PATCH] libxl: prevent xl from running if xend is running."): > Prevent xl from doing any operation if xend daemon is running. That prevents > bugs that happened when xl and xend raced to close a domain. Can we somehow limit this to commands that actually change things ? Having xl as a diagnostic tool even for xend-based systems is useful. > + if (!access(locks[i], F_OK) && !force_execution) { > + fprintf(stderr, "xend is running, which prevents xl from working " > + "correctly. If you still want to force the " > + "execution of xl please use the -f option\n"); > + exit(2); > + } If access fails with an unexpected error code (EACCES? EIO?) this will blunder on. Ian.