Commit fd052bf6 authored by Riku Voipio's avatar Riku Voipio Committed by Aurelien Jarno
Browse files

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: default avatarRiku Voipio <riku.voipio@nokia.com>
parent cab1b4bd
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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();
}