aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-02-03 09:09:21 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-02-03 09:09:21 +0000
commit7eec742d383122d365a14d8e7b478c4c122179c7 (patch)
treea3d9deaa2b59b4b969bf5069de71e417b3834c27 /tools
parente1781903c71b6b2c84a2924bb63aeb918c983a34 (diff)
downloadxen-7eec742d383122d365a14d8e7b478c4c122179c7.tar.gz
xen-7eec742d383122d365a14d8e7b478c4c122179c7.tar.bz2
xen-7eec742d383122d365a14d8e7b478c4c122179c7.zip
Revert 16963:d29d74d4eeac and 16750:2ac0fd9fd4b4.
Continue to SIGKILL qemu-dm so that 'xm destroy' should always work rather than hang if qemu-dm is in a bad state. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/ioemu/target-i386-dm/helper2.c31
-rw-r--r--tools/python/xen/xend/image.py2
2 files changed, 5 insertions, 28 deletions
diff --git a/tools/ioemu/target-i386-dm/helper2.c b/tools/ioemu/target-i386-dm/helper2.c
index e831a5f133..d45ac7a999 100644
--- a/tools/ioemu/target-i386-dm/helper2.c
+++ b/tools/ioemu/target-i386-dm/helper2.c
@@ -637,7 +637,6 @@ int main_loop(void)
int evtchn_fd = xce_handle == -1 ? -1 : xc_evtchn_fd(xce_handle);
char *qemu_file;
fd_set fds;
- int ret = 0;
buffered_io_timer = qemu_new_timer(rt_clock, handle_buffered_io,
cpu_single_env);
@@ -648,15 +647,10 @@ int main_loop(void)
xenstore_record_dm_state("running");
while (1) {
- while (!((vm_running && suspend_requested) || shutdown_requested))
+ while (!(vm_running && suspend_requested))
/* Wait up to 10 msec. */
main_loop_wait(10);
- if (shutdown_requested) {
- ret = EXCP_INTERRUPT;
- break;
- }
-
fprintf(logfile, "device model saving state\n");
/* Pull all outstanding ioreqs through the system */
@@ -672,34 +666,17 @@ int main_loop(void)
xenstore_record_dm_state("paused");
/* Wait to be allowed to continue */
- while (suspend_requested && !shutdown_requested) {
- /*
- * Poll for shutdown via SDL every 10ms.
- * This is needed because SDL steals SIGTERM and only lets us
- * know about it after gui_update().
- */
- struct timeval tv;
- tv.tv_sec = 0;
- tv.tv_usec = 10000;
-
+ while (suspend_requested) {
FD_ZERO(&fds);
FD_SET(xenstore_fd(), &fds);
- if (select(xenstore_fd() + 1, &fds, NULL, NULL, &tv) > 0)
+ if (select(xenstore_fd() + 1, &fds, NULL, NULL, NULL) > 0)
xenstore_process_event(NULL);
-
- /* Refresh SDL state and pick up any pending shutdown request. */
- gui_update();
- }
-
- if (shutdown_requested) {
- ret = EXCP_INTERRUPT;
- break;
}
xenstore_record_dm_state("running");
}
- return ret;
+ return 0;
}
void destroy_hvm_domain(void)
diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py
index 39f37df6e0..02ea81c748 100644
--- a/tools/python/xen/xend/image.py
+++ b/tools/python/xen/xend/image.py
@@ -329,7 +329,7 @@ class ImageHandler:
return
if self.pid:
try:
- os.kill(self.pid, signal.SIGTERM)
+ os.kill(self.pid, signal.SIGKILL)
except OSError, exn:
log.exception(exn)
try: