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>
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
}