kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm tools: Fix SDL exit on window close
@ 2011-10-25 11:46 Sasha Levin
  2011-10-26  4:04 ` Osier Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2011-10-25 11:46 UTC (permalink / raw)
  To: penberg; +Cc: kvm, mingo, asias.hejun, gorcunov, 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.

Reported-by: Osier Yang <jyang@redhat.com>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm tools: Fix SDL exit on window close
  2011-10-25 11:46 [PATCH] kvm tools: Fix SDL exit on window close Sasha Levin
@ 2011-10-26  4:04 ` Osier Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Osier Yang @ 2011-10-26  4:04 UTC (permalink / raw)
  To: Sasha Levin; +Cc: penberg, kvm, mingo, asias.hejun, gorcunov

于 2011年10月25日 19:46, 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-26  4:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 11:46 [PATCH] kvm tools: Fix SDL exit on window close Sasha Levin
2011-10-26  4:04 ` Osier Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).