Thread (1 message) 1 message, 1 author, 2007-11-21

Re: 2.6.24-rc3: find complains about /proc/net

From: Eric W. Biederman <hidden>
Date: 2007-11-21 01:44:13
Also in: lkml

Robert Hancock [off-list ref] writes:
Eric W. Biederman wrote:
quoted
Could you elaborate a bit on how the semantics of returning the
wrong information are more useful?

In particular if a thread does the logical equivalent of:
grep Pid: /proc/self/status.  It always get the tgid despite
having a different process id.
The POSIX-defined userspace concept of a PID requires that all threads appear to
have the same PID. This is something that Linux didn't comply with under the old
LinuxThreads implementation and was finally fixed with NPTL. This isn't a
POSIX-defined interface, but I assume it's trying to be consistent with
getpid(), etc.

Linux exports two fields in /proc/self/status:
Tgid:   32698
Pid:    32698

The tgid maps to the posix concept.  The pid is this context is the
thread id.

So it seems broken to me to return the same thread id for different threads.

Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help