]> xenbits.xensource.com Git - people/liuw/stubdom.git/commitdiff
xend: destroy stubdoms synchronously
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 15 Oct 2009 07:16:42 +0000 (08:16 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 15 Oct 2009 07:16:42 +0000 (08:16 +0100)
This patch makes the destruction of stubdoms a synchronous event,
therefore it is no longer possible to run out of memory when rebooting
a guest because the stubdom of the old guest is always destroyed
before the creation of the new guest.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
stubdom-dm

index b76dab278bcd3b30ce91c54181e16450cedab596..bf77d1fad1944d4741b7c3b9138ca7bff8f2a8b8 100644 (file)
@@ -81,12 +81,8 @@ done
 
 term() {
     kill %1
-    (
-       [ -n "$vncpid" ] && kill -9 $vncpid
-       rm ${stubdom_configdir}/$domname-dm
-       xm destroy $domname-dm
-    ) &
-    # We need to exit immediately so as to let xend do the commands above
+    [ -n "$vncpid" ] && kill -9 $vncpid
+    rm ${stubdom_configdir}/$domname-dm
     exit 0
 }