From: Sasha Levin Date: Tue, 25 Oct 2011 11:46:47 +0000 (+0200) Subject: kvm tools: Fix SDL exit on window close X-Git-Tag: next-20111101~5^2~17 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=88a617185aa83e29172d93cf377e1b767c35e692;p=karo-tx-linux.git 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 --- 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; }