From fd052bf63a2ee8e8aff9bb9a51ce7c5f744561f4 Mon Sep 17 00:00:00 2001 From: Riku Voipio Date: Mon, 25 Jan 2010 14:30:49 +0200 Subject: 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 --- exec.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'exec.c') diff --git a/exec.c b/exec.c index 461bbff..b0caf7c 100644 --- a/exec.c +++ b/exec.c @@ -40,6 +40,7 @@ #include "kvm.h" #if defined(CONFIG_USER_ONLY) #include +#include #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(); } -- cgit v1.1