From: Bastian Blank Subject: [PATCH 2/3] UNTESTED: xend - Use os.execvp for xenstored startup Date: Wed, 26 Mar 2008 12:01:10 +0100 Message-ID: <20080326110110.GB20300@wavehammer.waldi.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Bastian Blank # Date 1206528849 -3600 # Node ID 784e9c500e4e6b2d6a76b639d695c8eaa5c99b62 # Parent 5e0412c5f5798b5c0acdd4057c91b3820d6c4afd Use os.execvp for xenstored startup. A similar patch is used since long time in the Debian package. Signed-off-by: Bastian Blank diff -r 5e0412c5f579 -r 784e9c500e4e tools/misc/xend --- a/tools/misc/xend Wed Mar 26 11:54:09 2008 +0100 +++ b/tools/misc/xend Wed Mar 26 11:54:09 2008 +0100 @@ -95,11 +95,11 @@ def start_xenstored(): f.close() except: pass - XENSTORED_TRACE = os.getenv("XENSTORED_TRACE") - cmd = "xenstored --pid-file /var/run/xenstore.pid" - if XENSTORED_TRACE: - cmd += " -T /var/log/xen/xenstored-trace.log" - s,o = commands.getstatusoutput(cmd) + args = ['xenstored', "--pid-file", pidfname] + if os.getenv("XENSTORED_TRACE"): + args.extend(["-T", "/var/log/xen/xenstored-trace.log"]) + if os.fork() == 0: + os.execvp('xenstored', args) def start_consoled(): if os.fork() == 0: -- There are always alternatives. -- Spock, "The Galileo Seven", stardate 2822.3