]> xenbits.xensource.com Git - xenclient/ioemu.git/commitdiff
Do not install signal handlers in qemu-dm
authorIan Jackson <ian@davenant.greenend.org.uk>
Tue, 30 Dec 2008 16:49:29 +0000 (16:49 +0000)
committerIan Jackson <ian@davenant.greenend.org.uk>
Tue, 30 Dec 2008 16:49:29 +0000 (16:49 +0000)
Instead, if we get a terminating signal, just die.  This means that
xend can kill us.  Unlike upstream qemu, we are not at risk from being
sent random console signals as an attempt to cleanly terminate the
domain.

Thanks to report from Dexuan Cui <dexuan.cui@intel.com>.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
vl.c

diff --git a/vl.c b/vl.c
index 99ebd9de8330288db09e5c04425b1aefd782222c..ac38c2abef8d4a774282065187b092c442672403 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -8885,7 +8885,11 @@ static void termsig_setup(void)
     struct sigaction act;
 
     memset(&act, 0, sizeof(act));
+#ifndef CONFIG_DM
     act.sa_handler = termsig_handler;
+#else
+    act.sa_handler = SIG_DFL;
+#endif
     sigaction(SIGINT,  &act, NULL);
     sigaction(SIGHUP,  &act, NULL);
     sigaction(SIGTERM, &act, NULL);