We've changed IPC to use sockets instead of signals, but the process of
closing the SDL window was still trigerring an exit signal causing
an ugly message and not cleaning up after itself.

This patch switches that to use the proper method of cleaning up.

Reported-by: Osier Yang <jy...@redhat.com>
Signed-off-by: Sasha Levin <levinsasha...@gmail.com>
---
 tools/kvm/ui/sdl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/ui/sdl.c b/tools/kvm/ui/sdl.c
index b84cd66..5bf11fa 100644
--- a/tools/kvm/ui/sdl.c
+++ b/tools/kvm/ui/sdl.c
@@ -4,6 +4,7 @@
 #include "kvm/i8042.h"
 #include "kvm/util.h"
 #include "kvm/kvm.h"
+#include "kvm/kvm-cpu.h"
 
 #include <SDL/SDL.h>
 #include <pthread.h>
@@ -254,7 +255,7 @@ static void *sdl__thread(void *p)
                SDL_Delay(1000 / FRAME_RATE);
        }
 exit:
-       kill(0, SIGKVMSTOP);
+       kvm_cpu__reboot();
 
        return NULL;
 }
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to