acct: real_parent ppid
authorRoland McGrath <roland@redhat.com>
Mon, 7 Jan 2008 22:23:34 +0000 (14:23 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 Jan 2008 22:55:37 +0000 (14:55 -0800)
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/acct.c

index cf19547cc9e42d346c49b0e51e89aa5fb19364d6..521dfa53cb999657ce8971494f1f573d88d55df7 100644 (file)
@@ -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);