Re: procfs man improvement

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

 



Hi Christian,

On Thu, 4 Apr 2019 at 16:19, Christian Brauner <christian@xxxxxxxxxx> wrote:
>
> On Thu, Apr 04, 2019 at 03:54:50PM +0200, Christian Brauner wrote:
> > 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. :)
>
> Well, apparently you already did

Yes, I added this info back in November. I discovered this feature
myself quite by accident. (I wrote a program that accidentally made
use of the feature, and then later was puzzled that it worked, when I
worked out what I had done.) And someone else also reported it also a
short time later.

> and it's just that even on Disco Dingo
> the manpages are not new enough or a new version with this hasn't been
> released. Sorry for the noise!

You're relying on downstream to be up to date? :-)
http://man7.org/linux/man-pages/ is better.

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[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