All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acct: real_parent ppid
@ 2008-01-07 22:23 Roland McGrath
  0 siblings, 0 replies; only message in thread
From: Roland McGrath @ 2008-01-07 22:23 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linux-kernel


The ac_ppid field reported in process accounting records
should match what getppid() would have returned to that
process, regardless of whether a debugger is attached.

Signed-off-by: Roland McGrath <roland@redhat.com>
---
 kernel/acct.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/acct.c b/kernel/acct.c
index cf19547..521dfa5 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -482,7 +482,7 @@ static void do_acct_process(struct file *file)
 #endif
 #if ACCT_VERSION==3
 	ac.ac_pid = current->tgid;
-	ac.ac_ppid = current->parent->tgid;
+	ac.ac_ppid = current->real_parent->tgid;
 #endif
 
 	spin_lock_irq(&current->sighand->siglock);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-07 22:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-07 22:23 [PATCH] acct: real_parent ppid Roland McGrath

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.