projects/linux·commit fcfd50af

show_task: real_parent

fcfd50af · Roland McGrath <[email protected]> · 2008-01-09 00:03:23 -08:00

The show_task function invoked by sysrq-t et al displays the
pid and parent's pid of each task.  It seems more useful to
show the actual process hierarchy here than who is using
ptrace on each process.

Signed-off-by: Roland McGrath <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
fcfd50afb6e94c8cf121ca4e7e3e7166bae7c6aa
Parents
cdf71a10

Changes

1 files changed · +1 −1

FileStatusAddDelContent
kernel/sched.cmodified+1−1View file

kernel/sched.c

View file
diff --git a/kernel/sched.c b/kernel/sched.c
index 3df84ea..37cf07a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4918,7 +4918,7 @@ static void show_task(struct task_struct *p)
}
#endif
printk(KERN_CONT "%5lu %5d %6d\n", free,
- task_pid_nr(p), task_pid_nr(p->parent));
+ task_pid_nr(p), task_pid_nr(p->real_parent));
if (state != TASK_RUNNING)
show_stack(p, NULL);