2011-12-11 03:42:09 +01:00
|
|
|
From: Alexander Graf <agraf@suse.de>
|
|
|
|
Date: Mon, 21 Nov 2011 23:50:36 +0100
|
2019-01-04 22:08:16 +01:00
|
|
|
Subject: XXX dont dump core on sigabort
|
2011-12-11 03:42:09 +01:00
|
|
|
|
2018-12-06 22:20:59 +01:00
|
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
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
|
2019-09-12 17:54:03 +02:00
|
|
|
index 5ca6d62b15d3e4d3faee3f554fff..1d6382ce881795b057ab229e4129 100644
|
2011-12-11 03:42:09 +01:00
|
|
|
--- a/linux-user/signal.c
|
|
|
|
+++ b/linux-user/signal.c
|
2019-09-12 17:54:03 +02:00
|
|
|
@@ -581,6 +581,10 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig)
|
2016-04-05 15:18:15 +02:00
|
|
|
trace_user_force_sig(env, target_sig, host_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();
|
2019-09-12 17:54:03 +02:00
|
|
|
@@ -598,6 +602,8 @@ static void QEMU_NORETURN dump_core_and_abort(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
|