[PATCH] kvm tools: Fix SDL exit on window close

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux