LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] show_task: real_parent
@ 2008-01-09  8:03 Roland McGrath
  2008-01-09  9:16 ` Ingo Molnar
  2008-01-09 16:03 ` Linus Torvalds
  0 siblings, 2 replies; 4+ messages in thread
From: Roland McGrath @ 2008-01-09  8:03 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linux-kernel


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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-09 20:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-09  8:03 [PATCH] show_task: real_parent Roland McGrath
2008-01-09  9:16 ` Ingo Molnar
2008-01-09 16:03 ` Linus Torvalds
2008-01-09 20:15   ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).