ps: restore thread display when using a pidlist option
This commit will once again display threads when using the -L option along with any of those pidlist options. Reference(s): https://gitlab.com/procps-ng/procps/-/issues/234 Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
8cb646bdfc
commit
e914f4b068
@ -289,9 +289,12 @@ static void simple_spew(void){
|
|||||||
// -q option (only single SEL_PID_QUICK typecode entry expected in the list, if present)
|
// -q option (only single SEL_PID_QUICK typecode entry expected in the list, if present)
|
||||||
if (selection_list && selection_list->typecode == SEL_PID_QUICK) {
|
if (selection_list && selection_list->typecode == SEL_PID_QUICK) {
|
||||||
unsigned *pidlist = xcalloc(selection_list->n, sizeof(unsigned));
|
unsigned *pidlist = xcalloc(selection_list->n, sizeof(unsigned));
|
||||||
|
enum pids_select_type which;
|
||||||
for (i = 0; i < selection_list->n; i++)
|
for (i = 0; i < selection_list->n; i++)
|
||||||
pidlist[i] = selection_list->u[selection_list->n-i-1].pid;
|
pidlist[i] = selection_list->u[selection_list->n-i-1].pid;
|
||||||
pidread = procps_pids_select(Pids_info, pidlist, selection_list->n, PIDS_SELECT_PID);
|
which = (thread_flags & (TF_loose_tasks|TF_show_task))
|
||||||
|
? PIDS_SELECT_PID_THREADS : PIDS_SELECT_PID;
|
||||||
|
pidread = procps_pids_select(Pids_info, pidlist, selection_list->n, which);
|
||||||
free(pidlist);
|
free(pidlist);
|
||||||
} else {
|
} else {
|
||||||
enum pids_fetch_type which;
|
enum pids_fetch_type which;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user