diff options
author | Riku Voipio <riku.voipio@nokia.com> | 2010-01-25 14:30:49 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-02-06 17:19:43 +0100 |
commit | fd052bf63a2ee8e8aff9bb9a51ce7c5f744561f4 (patch) | |
tree | 9107abec60f02e66ade807fa75620667dc3c49dd | |
parent | cab1b4bdc7d42759e0487e73cc19946e77c82a3a (diff) |
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.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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(); } |