2004-10-07 10:49:59

by Dinakar Guniguntala

[permalink] [raw]
Subject: [PATCH] ps shows wrong ppid

Hi,

/proc shows the wrong PID as parent in the following case

Process A creates Threads 1 & 2 (using pthread_create)
Thread 2 then forks and execs process B
getppid() for Process B shows Process A (rightly) as parent,
however /proc/B/status shows Thread 3 as PPid (incorrect)

Following patch has been tested and it works ok

Regards,

Dinakar

Signed-off-by: Dinakar Guniguntala <[email protected]>


Attachments:
(No filename) (401.00 B)
ps.patch (607.00 B)
Download all attachments

2004-10-19 10:37:52

by Dinakar Guniguntala

[permalink] [raw]
Subject: [PATCH] stat shows wrong ppid

Hi,

One more place in fs/proc/array.c where ppid is wrong, which
I missed in my previous mail to lkml

Please apply

Regards,

Dinakar

Signed-off-by: Dinakar Guniguntala <[email protected]>


On Thu, Oct 07, 2004 at 04:33:23PM +0530, Dinakar Guniguntala wrote:
> Hi,
>
> /proc shows the wrong PID as parent in the following case
>
> Process A creates Threads 1 & 2 (using pthread_create)
> Thread 2 then forks and execs process B
> getppid() for Process B shows Process A (rightly) as parent,
> however /proc/B/status shows Thread 2 as PPid (incorrect)
>
> Following patch has been tested and it works ok
>
> Regards,
>
> Dinakar
>


Attachments:
(No filename) (638.00 B)
stat.patch (527.00 B)
Download all attachments