LKML Archive on
help / color / mirror / Atom feed
From: Roland McGrath <>
To: Andrew Morton <>,
	Linus Torvalds <>
Subject: [PATCH] show_task: real_parent
Date: Wed,  9 Jan 2008 00:03:23 -0800 (PST)	[thread overview]
Message-ID: <20080109080323.8FCDC26F9A7@magilla.localdomain> (raw)

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

             reply	other threads:[~2008-01-09  8:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09  8:03 Roland McGrath [this message]
2008-01-09  9:16 ` [PATCH] show_task: real_parent Ingo Molnar
2008-01-09 16:03 ` Linus Torvalds
2008-01-09 20:15   ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080109080323.8FCDC26F9A7@magilla.localdomain \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).