From 88a617185aa83e29172d93cf377e1b767c35e692 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Tue, 25 Oct 2011 13:46:47 +0200 Subject: [PATCH] kvm tools: Fix SDL exit on window close 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 Signed-off-by: Sasha Levin Signed-off-by: Pekka Enberg --- tools/kvm/ui/sdl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/kvm/ui/sdl.c b/tools/kvm/ui/sdl.c index b84cd6606e01..5bf11fa6a954 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 #include @@ -254,7 +255,7 @@ static void *sdl__thread(void *p) SDL_Delay(1000 / FRAME_RATE); } exit: - kill(0, SIGKVMSTOP); + kvm_cpu__reboot(); return NULL; } -- 2.39.5