Re: how to find all threads of a given process?

From: Miquel van Smoorenburg
Date: Fri Jan 07 2005 - 06:59:54 EST


In article <20050107002333.21133.qmail@xxxxxxxxxxxxxxxxxxxxxxx>,
jesse <jessezx@xxxxxxxxx> wrote:
>suppose I already know the PID of a process, how could
>i quickly identify all threads of this process?

With 2.6 and NPTL, you'll find them under /proc/PID/task

>As i know, under /proc, threads of all processes have
>prefix ".", one way is to iterate each one and do the
>check. the approach is too expensive. any other
>suggestions?

I've never seen anything like that. Is that a vendor-patched
kernel, something like Redhat 2.4 + NPTL support ?

Mike.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/