]> git.hungrycats.org Git - linux/commitdiff
[PATCH] stat shows wrong ppid
authorDinakar Guniguntala <dino@in.ibm.com>
Thu, 21 Oct 2004 03:58:41 +0000 (20:58 -0700)
committerLinus Torvalds <torvalds@evo.osdl.org>
Thu, 21 Oct 2004 03:58:41 +0000 (20:58 -0700)
One more place in fs/proc/array.c where ppid is wrong, which I missed in my
previous mail to lkml.

Signed-off-by: Dinakar Guniguntala <dino@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/proc/array.c

index e70769e7e1ce8fd823bdd07c19cb4ac8e8539fc6..6db46cb190c5d711ed00af23825f9443347cea4f 100644 (file)
@@ -370,7 +370,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
                        stime += task->signal->stime;
                }
        }
-       ppid = task->pid ? task->real_parent->pid : 0;
+       ppid = task->pid ? task->group_leader->real_parent->tgid : 0;
        read_unlock(&tasklist_lock);
 
        if (!whole || num_threads<2)