From: Alexander Graf Date: Mon, 21 Nov 2011 23:50:36 +0100 Subject: XXX dont dump core on sigabort Signed-off-by: Bruce Rogers --- linux-user/signal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux-user/signal.c b/linux-user/signal.c index 092e70b80c6ffb83fc52ff6d6a0a..b918084cc769c9bc1d15fbfad792 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -737,6 +737,10 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) trace_user_dump_core_and_abort(env, target_sig, host_sig); gdb_signalled(env, target_sig); + 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(); @@ -754,6 +758,8 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) target_sig, strsignal(host_sig), "core dumped" ); } +no_core: + /* The proper exit code for dying from an uncaught signal is * -. The kernel doesn't allow exit() or _exit() to pass * a negative value. To get the proper exit code we need to