History

show_task: real_parent

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.

Roland McGrath committed 18 years ago

Commit fcfd50a1 parent cdf71a11 file · +1 −1Browse files

Unified · Split

kernel/sched.c+1−1
@@ -4918,7 +4918,7 @@ static void show_task(struct task_struct *p) · 4917 unmodified lines
49184918 }
49194919 #endif
49204920 printk(KERN_CONT "%5lu %5d %6d\n", free,
4921− task_pid_nr(p), task_pid_nr(p->parent));
4921+ task_pid_nr(p), task_pid_nr(p->real_parent));
49224922
49234923 if (state != TASK_RUNNING)
49244924 show_stack(p, NULL);