Re: proc fs and shared pids

Michiel Boland (boland@sci.kun.nl)
Tue, 06 Aug 1996 14:32:39 +0200


Hello again.
I appreciate all the discussion that has been stirred now, although
my original complaint was rather about the shared pids in relation
to /proc, not the shared pids per se.

So i would now like to go away from the pids and go to proc ;)

I personally think /proc/<pid> in its present state is just
about useless, since one has to do an awful lot of reading,
parsing etc. to get the process status.

For example, you have to take into account process with spaces
in their names, and if you want to find out the real/other
uid/gid you have to read another file (/proc/<pid>/status),
which may be gone by the time you have finished reading
/proc/<pid>/stat! And then there's now also this problem with
shared pids.

A solaris-like implementation of /proc would be handy.
(Sound of breaking programs in the background)

Incidentally, I would also like to point out that the `wchan'
field is not always correctly reported on an i386 machine. Many
processes are reported to be in `sleep_on' or
`interruptible_sleep_on' which is not very useful. I can't find
the patch right now, but you only have to look at the alpha code
right underneath the i386 code in fs/proc/array.c to see how it
*should* be done.

-- 
Michiel Boland <boland@sci.kun.nl>
University of Nijmegen The Netherlands