From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33710 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5EA6-0001f5-DO for qemu-devel@nongnu.org; Thu, 31 Mar 2011 05:27:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5EA3-0006a0-T3 for qemu-devel@nongnu.org; Thu, 31 Mar 2011 05:27:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5EA3-0006Zc-JW for qemu-devel@nongnu.org; Thu, 31 Mar 2011 05:27:27 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2V9RPjP020126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Mar 2011 05:27:25 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2V9RO6a025054 for ; Thu, 31 Mar 2011 05:27:25 -0400 Date: Thu, 31 Mar 2011 11:27:23 +0200 From: Gleb Natapov Message-ID: <20110331092723.GJ7766@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] register signal handler after initializing SDL. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org SDL library initialization mangles signal handlers, so QEMU should register them after initializing SDL. This was the case before and code even have a comment about that. Fix it to be so again. Signed-off-by: Gleb Natapov Reviewed-by: Peter Maydell diff --git a/vl.c b/vl.c index 192a240..93aaccf 100644 --- a/vl.c +++ b/vl.c @@ -3148,9 +3148,6 @@ int main(int argc, char **argv, char **envp) cpu_synchronize_all_post_init(); - /* must be after terminal init, SDL library changes signal handlers */ - os_setup_signal_handling(); - set_numa_modes(); current_machine = machine; @@ -3206,6 +3203,9 @@ int main(int argc, char **argv, char **envp) break; } + /* must be after terminal init, SDL library changes signal handlers */ + os_setup_signal_handling(); + #ifdef CONFIG_VNC /* init remote displays */ if (vnc_display) { -- Gleb.