From patchwork Fri Aug 28 17:25:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 32385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id A320EB6EDE for ; Sat, 29 Aug 2009 03:29:57 +1000 (EST) Received: from localhost ([127.0.0.1]:54194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mh5Gr-0000dz-IF for incoming@patchwork.ozlabs.org; Fri, 28 Aug 2009 13:29:53 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mh5Eo-0008Dy-Cw for qemu-devel@nongnu.org; Fri, 28 Aug 2009 13:27:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mh5Ej-0008CB-OJ for qemu-devel@nongnu.org; Fri, 28 Aug 2009 13:27:46 -0400 Received: from [199.232.76.173] (port=57402 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mh5Ej-0008C4-Jh for qemu-devel@nongnu.org; Fri, 28 Aug 2009 13:27:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11554) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mh5Ej-0001h8-5t for qemu-devel@nongnu.org; Fri, 28 Aug 2009 13:27:41 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7SHRe9H020264 for ; Fri, 28 Aug 2009 13:27:40 -0400 Received: from localhost.localdomain (vpn2-8-222.ams2.redhat.com [10.36.8.222]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7SHRdf7006281; Fri, 28 Aug 2009 13:27:39 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 28 Aug 2009 19:25:15 +0200 Message-Id: <1251480315-21700-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH] Delay sighandler_setup() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org If we are using --serial telnet:0:5555,server or similar, ^C will not kill qemu. We need to first connect using telnet, and the the ^C takes effect. Signed-off-by: Juan Quintela --- vl.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index 6994b4d..87ddcf6 100644 --- a/vl.c +++ b/vl.c @@ -5809,11 +5809,6 @@ int main(int argc, char **argv, char **envp) register_savevm("timer", 0, 2, timer_save, timer_load, NULL); register_savevm_live("ram", 0, 3, ram_save_live, NULL, ram_load, NULL); -#ifndef _WIN32 - /* must be after terminal init, SDL library changes signal handlers */ - sighandler_setup(); -#endif - /* Maintain compatibility with multiple stdio monitors */ if (!strcmp(monitor_device,"stdio")) { for (i = 0; i < MAX_SERIAL_PORTS; i++) { @@ -5946,6 +5941,11 @@ int main(int argc, char **argv, char **envp) kernel_filename, kernel_cmdline, initrd_filename, cpu_model); +#ifndef _WIN32 + /* must be after terminal init, SDL library changes signal handlers */ + sighandler_setup(); +#endif + for (env = first_cpu; env != NULL; env = env->next_cpu) { for (i = 0; i < nb_numa_nodes; i++) { if (node_cpumask[i] & (1 << env->cpu_index)) {