Re: Who changed /proc// in 2.6.0-test5-bk9?

Albert Cahalan
2003-10-02T01:12:44Z

On Wed, 2003-10-01 at 20:38, Linus Torvalds wrote:
> On 1 Oct 2003, Albert Cahalan wrote:
> >
> > It certainly seems to me that the intent of /proc/self is
> > to point to a "process", which is a tgid in kernel terms.
>
> My argument against that is that it actually loses information. Now there
> is no way to easily look up the current thread stuff.

This maybe?

/proc/task -> 42/task/84

> If /proc/self points to a thread, it's easy to look up the process with a
> "/proc/self/../..".

That wouldn't have worked with /proc/self pointing to
an invisible directory like it did. It could certainly
be made to work, like this:

/proc/self -> 42/task/84

Had the /proc/self code not been modified, you'd get
a nasty link like this:

/proc/self -> 84 (and "84" isn't listed in /proc)

So using "/proc/self/../.." would just go up to "/".
That's not too useful.