kvm tools: Fix SDL exit on window close
PATCH 1/1 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 <[email protected]>
Signed-off-by Sasha Levin <[email protected]>
--- tools/kvm/ui/sdl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
tools/kvm/ui/sdl.c +2 -1
@@ -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 ; }
Signature · 1 line
1.7.7
Quoted 5 lines · Sasha Levin
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.
The patch works, thanks.
Osier