xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [xen stable-4.4] xend: Stop QEMU for dom0 using xend toolstack
@ 2014-05-21  7:01 李义
  2014-05-21  8:19 ` Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: 李义 @ 2014-05-21  7:01 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Ian Jackson, Ian Campbell, Jan Beulich,
	stefano.stabellini

It is useless QEMUs started up for Dom0 when using the xend toolstack

Signed-off-by: Yi Li <peteryili@tencent.com>
---
 tools/hotplug/Linux/init.d/xend |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tools/hotplug/Linux/init.d/xend b/tools/hotplug/Linux/init.d/xend
index 8921383..bd85004 100755
--- a/tools/hotplug/Linux/init.d/xend
+++ b/tools/hotplug/Linux/init.d/xend
@@ -22,6 +22,7 @@

 shopt -s extglob

+QEMU_PIDFILE=/var/run/qemu-dom0.pid
 # Wait for Xend to be up
 function await_daemons_up
 {
@@ -56,6 +57,13 @@ case "$1" in
     fi
     ${SBINDIR}/xend start
     await_daemons_up
+
+    if read 2>/dev/null <$QEMU_PIDFILE pid; then
+        echo "Stopping QEMU For dom0 when using xend toolstack"
+        kill $pid
+        while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
+        rm -f $QEMU_PIDFILE
+    fi
     ;;
   stop)
     ${SBINDIR}/xend stop
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-21  8:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21  7:01 [xen stable-4.4] xend: Stop QEMU for dom0 using xend toolstack 李义
2014-05-21  8:19 ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).