Skip to content

Commit

Permalink
acct: real_parent ppid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Jan 7, 2008
1 parent 45626bb commit b59f819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/acct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b59f819

Please sign in to comment.