summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@nokia.com>2010-01-25 14:30:49 +0200
committerRiku Voipio <riku.voipio@nokia.com>2010-02-05 14:50:58 +0200
commitd3219c7bd08056344f077bdc81eee71bcfc8b1c8 (patch)
treeddd53224d4859d09cfe5d30e109d8686865044d2
parent26bc95a037ef5e65afacc89082725a34ba23fdbd (diff)
downloadhqemu-d3219c7bd08056344f077bdc81eee71bcfc8b1c8.zip
hqemu-d3219c7bd08056344f077bdc81eee71bcfc8b1c8.tar.gz
linux-user: remove signal handler before calling abort()
Qemu may hang in host_signal_handler after qemu has done a seppuku with cpu_abort(). But at this stage we are not really interested in target process coredump anymore, so unregister host_signal_handler to die grafefully. Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
-rw-r--r--exec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 431e104..eeb17d0 100644
--- a/exec.c
+++ b/exec.c
@@ -40,6 +40,7 @@
#include "kvm.h"
#if defined(CONFIG_USER_ONLY)
#include <qemu.h>
+#include <signal.h>
#endif
//#define DEBUG_TB_INVALIDATE
@@ -1692,6 +1693,14 @@ void cpu_abort(CPUState *env, const char *fmt, ...)
}
va_end(ap2);
va_end(ap);
+#if defined(CONFIG_USER_ONLY)
+ {
+ struct sigaction act;
+ sigfillset(&act.sa_mask);
+ act.sa_handler = SIG_DFL;
+ sigaction(SIGABRT, &act, NULL);
+ }
+#endif
abort();
}
OpenPOWER on IntegriCloud