Commit b59f8197 authored by Roland McGrath's avatar Roland McGrath Committed by Linus Torvalds

acct: real_parent ppid

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: default avatarRoland McGrath <roland@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 45626bb2
...@@ -482,7 +482,7 @@ static void do_acct_process(struct file *file) ...@@ -482,7 +482,7 @@ static void do_acct_process(struct file *file)
#endif #endif
#if ACCT_VERSION==3 #if ACCT_VERSION==3
ac.ac_pid = current->tgid; ac.ac_pid = current->tgid;
ac.ac_ppid = current->parent->tgid; ac.ac_ppid = current->real_parent->tgid;
#endif #endif
spin_lock_irq(&current->sighand->siglock); spin_lock_irq(&current->sighand->siglock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment