Showing pgids used to disable compaction. But, despite the vague
NPTL documentation, its not possible to have different PGID in the
same thread group, so lack of compaction is not required.
With setpgid(), the last thread in the process that calls it
wins. There might be a debate about should this be the right way
but that's a kernel thing.
References:
#34
Test program https://gitlab.com/-/snippets/
2094161
https://man7.org/linux/man-pages/man7/nptl.7.html
Changes in NEXT
===============
* pstree: Check for process with show_parents #38
+ * pstree: Don't disable compaction with show pgids #34
Changes in 23.4
===============
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
-.TH PSTREE 1 "2021-01-05" "psmisc" "User Commands"
+.TH PSTREE 1 "2021-06-21" "psmisc" "User Commands"
.SH NAME
pstree \- display a tree of processes
.SH SYNOPSIS
.IP \fB\-g\fP
Show PGIDs. Process Group IDs are shown as decimal numbers in
parentheses after each process name.
-.B \-g
-implicitly disables compaction. If both PIDs and PGIDs are displayed
-then PIDs are shown first.
+If both PIDs and PGIDs are displayed then PIDs are shown first.
.IP \fB\-G\fP
Use VT100 line drawing characters.
.IP \fB\-h\fP
break;
case 'g':
pgids = 1;
- compact = 0;
break;
case 's':
show_parents = 1;