procfs man improvement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Michael,

While working on pidfd Jann and I realized that TIDs don't get listed in

ls -al /proc

which is intended behavior. However, the directories for them still
exist i.e.

ls -al /proc/<tid>

works perfectly fine and so by extension do things like

cat /proc/<tid>/status.

This is information was new to us, as it was for some other people as
well. Afaict, the manpage for procfs doesn't mention this behavior at
all. I think it really should as this quite some implications:
- threads can be accessed via open("/proc/<tid>", ...) just as
  thread-group leaders can
- all files that are available for thread-group leaders are available
  for threads as well (This is not the case when going through
  /proc/<pid>/task/<tid>.)
(Implementation-wise this means that threads are available once as
through tgid_proc_operations and once through tid_proc_operations but
that detail probably doesn't need to show up in the manpage.)

This is apparently part of the API so we should really document it. :)

Thanks!
Christian



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux