From: Sasha Levin Subject: [PATCH] kvm tools: Fix SDL exit on window close Date: Tue, 25 Oct 2011 13:46:47 +0200 Message-ID: <1319543207-4950-1-git-send-email-levinsasha928@gmail.com> Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com, Sasha Levin To: penberg@cs.helsinki.fi Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:58250 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756341Ab1JYLq4 (ORCPT ); Tue, 25 Oct 2011 07:46:56 -0400 Received: by faan17 with SMTP id n17so407274faa.19 for ; Tue, 25 Oct 2011 04:46:55 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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 #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; } -- 1.7.7