mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philippe De Muyter <phdm@macqel.be>
To: linux-kernel@vger.kernel.org
Subject: core_uses_pid==0 still produces core.PID
Date: Tue, 15 Jul 2008 12:55:04 +0200	[thread overview]
Message-ID: <20080715105504.GA31097@frolo.macqel> (raw)

Hello everybody

I have a process that produces core files of the form "core.PID".

I read in the docs the core file name can be controlled by
/proc/sys/kernel/core_pattern and /proc/sys/kernel/core_uses_pid.

On my machine, they have the value "core" and 0, so I would expect the
core files named "core", not "core.PID".

If I start "sleep 100" and kill it with CTRL-C, I indeed get a file
named "core", but with my interesting process the files are always named
"core.PID".

Looking at the fs/exec.c sources, I see that core_uses_pid is superseded
by
	atomic_read(&current->mm->mm_users) != 1

Why is that needed there ? When my process crashes or is killed, I always
get only one core file, not many core files, although my process is
multi-threaded.

Is that a rest of a previous thread implementation that could now be removed ?

Best regards

Philippe

                 reply	other threads:[~2008-07-15 10:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080715105504.GA31097@frolo.macqel \
    --to=phdm@macqel.be \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®