Re: proc fs and shared pids

Michiel Boland (
Tue, 30 Jul 1996 16:26:36 +0200

>Kernelthreads? They dont shre the same pid. Userthreads are not visible to
>the kernel at all and therefore there is no proc entry.

As I understand it, kernel threads are implemented in linux with
clone(), and hence they *can* share the same PID. Whether this
is a good idea is perhaps another matter.

Just did some experimenting with clone() and the CLONE_PID flag.

This creates a new process with the same process ID as the original
process. The proc fs has two directory entries for this with the same
i-number. (!) So I guess the status of one of the two processes can never
be retrieved.

IMHO this is yet another severe shortcoming of /proc. It would perhaps
be better to create a device which you can read and then returns the
status of all processes. I just wrote a module that does exactly that.

Michiel Boland <>
University of Nijmegen
The Netherlands