[PATCH][2.1.78] procfs pedantry

Matthew Kirkwood (weejock@ferret.lmh.ox.ac.uk)
Thu, 8 Jan 1998 12:16:08 +0000 (GMT)


G'day, y'all...

The following bit of pedantry fixes a (very
slight) niggle I have with /proc/<pid>/ whereby
I can do this:

pc29:~# cd /proc/000000000000001
pc29:/proc/000000000000001# ls
total 0
0 -r--r--r-- 1 root root 0 Jan 8 11:53 cmdline
0 lrwx------ 1 root root 0 Jan 8 11:53 cwd -> //
0 -r-------- 1 root root 0 Jan 8 11:53 environ
0 lrwx------ 1 root root 0 Jan 8 11:53 exe -> /sbin/init*
0 dr-x------ 1 root root 0 Jan 8 11:53 fd/
0 pr--r--r-- 1 root root 0 Jan 8 11:53 maps|
0 -rw------- 1 root root 0 Jan 8 11:53 mem
0 lrwx------ 1 root root 0 Jan 8 11:53 root -> //
0 -r--r--r-- 1 root root 0 Jan 8 11:53 stat
0 -r--r--r-- 1 root root 0 Jan 8 11:53 statm
0 -r--r--r-- 1 root root 0 Jan 8 11:53 status
pc29:/proc/000000000000001#

I haven't actually bothered to test it, as my
CPU is running hot with other things ATM, but
is seems harmless enough.

If it breaks any userspace stuff, then the writers
of such code should be soundly beaten :-)

Matthew.

--
Matthew Kirkwood  |  Mail:  matthew.kirkwood@lmh.ox.ac.uk
LMH JCR,          |  Web:   http://www-jcr.lmh.ox.ac.uk/~weejock/
Oxford OX2 6QA,   |  
England.          |  "To do things badly is a basic human right"