From: Riku Voipio <riku.voipio@iki.fi>
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@nokia.com>
Subject: [Qemu-devel] [PATCH 3/4] linux-user: remove signal handler before calling abort()
Date: Wed, 27 Jan 2010 12:49:24 +0000 [thread overview]
Message-ID: <1264596565-8907-4-git-send-email-riku.voipio@iki.fi> (raw)
In-Reply-To: <1264596565-8907-1-git-send-email-riku.voipio@iki.fi>
From: Riku Voipio <riku.voipio@nokia.com>
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>
---
exec.c | 9 +++++++++
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();
}
--
1.6.5
next prev parent reply other threads:[~2010-01-27 12:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 12:49 [Qemu-devel] [PATCH 0/4] linux-user-for-upstream patches Riku Voipio
2010-01-27 12:49 ` [Qemu-devel] [PATCH 1/4] linux-user: adapt uname machine to emulated CPU Riku Voipio
2010-01-27 12:49 ` [Qemu-devel] [PATCH 2/4] fix locking error with current_tb Riku Voipio
2010-01-27 12:49 ` Riku Voipio [this message]
2010-01-27 12:49 ` [Qemu-devel] [PATCH 4/4] target-arm: refactor cp15.c13 register access Riku Voipio
2010-01-27 13:55 ` Laurent Desnogues
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1264596565-8907-4-git-send-email-riku.voipio@iki.fi \
--to=riku.voipio@iki.fi \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).