qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Riku Voipio <riku.voipio@iki.fi>
To: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] linux-user and signal handling
Date: Fri, 19 Jun 2009 11:08:23 +0300	[thread overview]
Message-ID: <20090619080823.GB20694@kos.to> (raw)
In-Reply-To: <873a9xs53r.fsf@lechat.rtp-net.org>

On Thu, Jun 18, 2009 at 09:40:24PM +0200, Arnaud Patard wrote:
> Riku Voipio <riku.voipio@iki.fi> 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: <ee2f075ebbfa35f11bcfffb813ed6288e536262b.1245398394.git.riku.voipio@iki.fi>
From: Riku Voipio <riku.voipio@iki.fi>
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 <riku.voipio@iki.fi>
---
 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	other threads:[~2009-06-19  8:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 11:56 [Qemu-devel] linux-user and signal handling Arnaud Patard
2009-06-18 13:26 ` Ulrich Hecht
2009-06-18 15:17   ` Arnaud Patard
2009-06-18 15:35     ` Ulrich Hecht
2009-06-18 16:08       ` Ulrich Hecht
2009-06-18 16:27         ` Arnaud Patard
2009-06-18 17:14           ` Daniel Jacobowitz
2009-06-18 18:45             ` Riku Voipio
2009-06-18 19:40               ` Arnaud Patard
2009-06-19  8:08                 ` Riku Voipio [this message]

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=20090619080823.GB20694@kos.to \
    --to=riku.voipio@iki.fi \
    --cc=arnaud.patard@rtp-net.org \
    --cc=qemu-devel@nongnu.org \
    /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).