qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] linux-user and signal handling


From: Riku Voipio
Subject: Re: [Qemu-devel] linux-user and signal handling
Date: Fri, 19 Jun 2009 11:08:23 +0300
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Jun 18, 2009 at 09:40:24PM +0200, Arnaud Patard wrote:
> Riku Voipio <address@hidden> writes:
> > Or to be more specific, trading off a unneeded core dump of a qemu process
> > (since we got a core dump of the target process) to not having core bit set
> > in exit status.

> > If people depend on WCOREDUMP(), we can remove that bit of eliminating
> > the host process coredump.

> I understand the idea is to get coredump for the target and not of the
> host. What's worrying me is that it should be transparent to the target
> and it's not the case.
> It would be nice if this can be fixed.

It can be fixed - like with the patch below. The question is which
people want it? I'm beginning to think we should go with the correctness
and live with the slighly annoying extra coredump.

>From ee2f075ebbfa35f11bcfffb813ed6288e536262b Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Riku Voipio <address@hidden>
Date: Fri, 19 Jun 2009 10:49:57 +0300
Subject: [PATCH 5/5] linux-user: do not avoid dumping of qemu itself

Previously we disabled dumping of qemu itself if we already
created coredump of the target process. This broke the abort01
LTP test and any application that used WCOREDUMP to find out
the child process dumped core. Remove this feature.

Signed-off-by: Riku Voipio <address@hidden>
---
 linux-user/signal.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/linux-user/signal.c b/linux-user/signal.c
index 6a34171..e1b6458 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -383,12 +383,6 @@ static void QEMU_NORETURN force_sig(int sig)
             ((*ts->bprm->core_dump)(sig, thread_env) == 0);
     }
     if (core_dumped) {
-        /* we already dumped the core of target process, we don't want
-         * a coredump of qemu itself */
-        struct rlimit nodump;
-        getrlimit(RLIMIT_CORE, &nodump);
-        nodump.rlim_cur=0;
-        setrlimit(RLIMIT_CORE, &nodump);
         (void) fprintf(stderr, "qemu: uncaught target signal %d (%s) - %s\n",
             sig, strsignal(host_sig), "core dumped" );
     }
-- 
1.6.2.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]