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 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! Christian