[PATCH] show_task: real_parent

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>
Cc: <linux-kernel@...>
Date: Wednesday, January 9, 2008 - 4:03 am

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 <roland@redhat.com>
---
 kernel/sched.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] show_task: real_parent, Roland McGrath, (Wed Jan 9, 4:03 am)
Re: [PATCH] show_task: real_parent, Linus Torvalds, (Wed Jan 9, 12:03 pm)
Re: [PATCH] show_task: real_parent, Roland McGrath, (Wed Jan 9, 4:15 pm)
Re: [PATCH] show_task: real_parent, Ingo Molnar, (Wed Jan 9, 5:16 am)