From: Yu Zhiguo <yuzg@cn.fujitsu.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [PATCH] xencommons: kill xenstored when stop xencommons
Date: Tue, 22 Jun 2010 09:35:26 +0800 [thread overview]
Message-ID: <4C20135E.3000609@cn.fujitsu.com> (raw)
xenstored should be killed when stop xencommons.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
diff -r 72c6228b5f0f -r be32d4fe1e8a tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons Mon Jun 21 19:19:25 2010 +0100
+++ b/tools/hotplug/Linux/init.d/xencommons Tue Jun 22 17:39:37 2010 +0800
@@ -21,6 +21,7 @@
test -f /etc/sysconfig/xencommons && . /etc/sysconfig/xencommons
+XENSTORED_PIDFILE=/var/run/xenstore.pid
XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
shopt -s extglob
@@ -43,7 +44,7 @@
test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored"
rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"
- xenstored --pid-file=/var/run/xenstore.pid $XENSTORED_ARGS
+ xenstored --pid-file=$XENSTORED_PIDFILE $XENSTORED_ARGS
xenstore-write "/local/domain/0/name" "Domain-0"
fi
@@ -53,6 +54,12 @@
test "`uname`" != "NetBSD" || xenbackendd $XENBACKENDD_ARGS
}
do_stop () {
+ if read 2>/dev/null <$XENSTORED_PIDFILE pid; then
+ kill $pid
+ while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
+ rm -f $XENSTORED_PIDFILE
+ fi
+
if read 2>/dev/null <$XENCONSOLED_PIDFILE pid; then
kill $pid
while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
next reply other threads:[~2010-06-22 1:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-22 1:35 Yu Zhiguo [this message]
2010-06-22 6:53 ` [PATCH] xencommons: kill xenstored when stop xencommons Yu Zhiguo
2010-06-22 10:07 ` Stefano Stabellini
2010-06-22 11:43 ` Vincent Hanquez
2010-06-22 10:15 ` 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=4C20135E.3000609@cn.fujitsu.com \
--to=yuzg@cn.fujitsu.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.