public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: Tim Schmielau <tim@physik3.uni-rostock.de>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] "biological parent" pid
Date: Tue, 01 Feb 2005 11:08:43 -0500	[thread overview]
Message-ID: <41FFA98B.2050800@tmr.com> (raw)
In-Reply-To: <Pine.LNX.4.53.0501311923440.18039@gockel.physik3.uni-rostock.de>

Tim Schmielau wrote:
> The ppid of a process is not really helpful if I want to reconstruct the 
> real history of processes on a machine, since it may become 1 when the
> parent dies and the process is reparented to init.
> 
> I am not aware of concepts in Linux or other unices that apply to this
> case. So I made up the "biological parent pid" bioppid (in contrast to the
> adoptive parents pid) that just never changes.
> Any user of it must of course remember that it doesn't need to be a valid 
> pid anymore or might even belong to a different process that was forked in 
> the meantime. bioppid only had to be a valid pid at time btime (it's
> a (btime, pid) pair that unambiguously identifies a process).

I think you are not only using a hammer to swat a fly, buy the wrong 
fly. Would it not do as well to log reparenting? You could even add that 
as an option to init, although if you are being lazy about tracking the 
original parent a kernel log saying something like
   reparent PID1 from PID2 to PID3
would be best. While I think all current reparenting is done to init, I 
could certainly think of a use for a method to reparent back to the 
grandparent, just to keep the accounting clean.

The init option would be unintrusive, but I doubt many people would feel 
the need for a kernel log feature. On the other hand it doesn't happen 
often, I looked at a system up 172 days and it had nothing but the 
daemons reparented (at the moment).

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me

  parent reply	other threads:[~2005-02-01 16:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-31 21:38 [RFC] "biological parent" pid Tim Schmielau
2005-01-31 22:04 ` linux-os
2005-01-31 22:09 ` Michael Buesch
2005-01-31 23:39   ` Tim Schmielau
2005-02-01  9:03     ` Helge Hafting
2005-02-01  8:59       ` Tim Schmielau
2005-02-01  0:07 ` Bernd Eckenfels
2005-02-01  9:07   ` Tim Schmielau
2005-02-01 16:08 ` Bill Davidsen [this message]
2005-02-01 18:02   ` Tim Schmielau

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=41FFA98B.2050800@tmr.com \
    --to=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim@physik3.uni-rostock.de \
    /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