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

Miquel van Smoorenburg
2003-10-02T08:46:31Z

In article <3F7B9CF9.4040706@redhat.com>,
Ulrich Drepper <drepper@redhat.com> wrote:
>Linus Torvalds wrote:
>
>> I think /proc/self most likely _should_ point into the thread, not the
>> task.
>
>As much as I want to not see this, I fear I have to agree.
>
>There is, for instance, no guarantee that all CLONE_THREAD clones also
>have CLONE_FILES set. Then using /proc/self/%d for some thread-local
>file descriptor will return the process group leaders file descriptor,
>not the own.

How about use /proc/self/task/self/fd/%d if /proc/self/task/self
exists, /proc/self/fd/%d otherwise ?

Mike.