2015-09-08 00:17:20 +02:00
|
|
|
From 1e556e72ef1334533b0a6ed652c7b00b0382949a Mon Sep 17 00:00:00 2001
|
2011-12-11 03:42:09 +01:00
|
|
|
From: Alexander Graf <agraf@suse.de>
|
|
|
|
Date: Mon, 21 Nov 2011 23:50:36 +0100
|
2012-02-01 00:10:40 +01:00
|
|
|
Subject: [PATCH] XXX dont dump core on sigabort
|
2011-12-11 03:42:09 +01:00
|
|
|
|
|
|
|
---
|
2014-01-17 23:04:30 +01:00
|
|
|
linux-user/signal.c | 6 ++++++
|
|
|
|
1 file changed, 6 insertions(+)
|
2011-12-11 03:42:09 +01:00
|
|
|
|
|
|
|
diff --git a/linux-user/signal.c b/linux-user/signal.c
|
2015-07-24 15:54:26 +02:00
|
|
|
index 9d4cef4..42c5681 100644
|
2011-12-11 03:42:09 +01:00
|
|
|
--- a/linux-user/signal.c
|
|
|
|
+++ b/linux-user/signal.c
|
2014-04-04 00:50:11 +02:00
|
|
|
@@ -448,6 +448,10 @@ static void QEMU_NORETURN force_sig(int target_sig)
|
2011-12-11 03:42:09 +01:00
|
|
|
host_sig = target_to_host_signal(target_sig);
|
2013-07-30 14:36:48 +02:00
|
|
|
gdb_signalled(env, target_sig);
|
2011-12-11 03:42:09 +01:00
|
|
|
|
|
|
|
+ if (target_sig == 6) {
|
|
|
|
+ goto no_core;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
/* dump core if supported by target binary format */
|
|
|
|
if (core_dump_signal(target_sig) && (ts->bprm->core_dump != NULL)) {
|
|
|
|
stop_all_tasks();
|
2014-04-04 00:50:11 +02:00
|
|
|
@@ -465,6 +469,8 @@ static void QEMU_NORETURN force_sig(int target_sig)
|
2011-12-11 03:42:09 +01:00
|
|
|
target_sig, strsignal(host_sig), "core dumped" );
|
|
|
|
}
|
|
|
|
|
|
|
|
+no_core:
|
|
|
|
+
|
|
|
|
/* The proper exit code for dying from an uncaught signal is
|
|
|
|
* -<signal>. The kernel doesn't allow exit() or _exit() to pass
|
|
|
|
* a negative value. To get the proper exit code we need to
|