]> granicus.if.org Git - procps-ng/commit
library: ensure thread group leader retrieval accuracy
authorJim Warner <james.warner@comcast.net>
Sat, 7 Aug 2021 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Mon, 9 Aug 2021 12:03:23 +0000 (22:03 +1000)
commita37526260917bac624ae6b75fd9f4ea7287d81ad
tree799bbf1041eb0261e9171c8f2ab50215dbcf2966
parent949382afe57ecffeb162d89e22140cd3a5068b1d
library: ensure thread group leader retrieval accuracy

With that recent addition of the autogroup provisions,
it became apparent that '/proc/<pid>/task' information
is sometimes incomplete. In fact, there's no autogroup
file at all in any '/proc/<pid>/task/<pid>' directory!

As a result, when the top -H mode was invoked, all the
processes showed a -1 for AGID, even the group leader.

So, this commit will ensure that for every TGID leader
its basic '/proc/<pid>' directory will always be used.
The 'task' subdirectory is now only used for siblings.

[ and it's time that readeither prologue was updated ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/readproc.c