]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Fix SDL exit on window close
authorSasha Levin <levinsasha928@gmail.com>
Tue, 25 Oct 2011 11:46:47 +0000 (13:46 +0200)
committerPekka Enberg <penberg@kernel.org>
Tue, 25 Oct 2011 11:51:22 +0000 (14:51 +0300)
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 <jyang@redhat.com>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/ui/sdl.c

index b84cd6606e019d2ad240a492a6a59a057df1e8a4..5bf11fa6a954941028fb144b701e5caf73443a3b 100644 (file)
@@ -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;
 }