Skip to content
Commit 0097875b authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

proc: Implement /proc/thread-self to point at the directory of the current thread



/proc/thread-self is derived from /proc/self.  /proc/thread-self
points to the directory in proc containing information about the
current thread.

This funtionality has been missing for a long time, and is tricky to
implement in userspace as gettid() is not exported by glibc.  More
importantly this allows fixing defects in /proc/mounts and /proc/net
where in a threaded application today they wind up being empty files
when only the initial pthread has exited, causing problems for other
threads.

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 6ba8ed79
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment