From 09982256515d46fedd5afb32b87919fdd6f94a3d Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Thu, 15 Jun 2017 12:00:00 -0500 Subject: [PATCH] top: ensure necessary proc_t support if '-U' filtering While the effective user id would always be present in each proc_t, thus supporting 'u' filtering, other user ids would only be present if /proc/$$/status was read. This commit just puts the 'master' branch top on a par with the 'newlib' branch when user filtering with 'U'. Signed-off-by: Jim Warner --- top/top.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/top/top.c b/top/top.c index 8f85c4af..8c3bd05a 100644 --- a/top/top.c +++ b/top/top.c @@ -1918,6 +1918,8 @@ static void build_headers (void) { f = w->rc.sortindx; Frames_libflags |= Fieldstab[f].lflg; if (EU_CMD == f && CHKw(w, Show_CMDLIN)) Frames_libflags |= L_CMDLINE; + // for 'U' filtering we need the other user ids too + if (w->usrseltyp == 'U') Frames_libflags |= L_status; } // end: VIZISw(w) if (Rc.mode_altscr) w = w->next; -- 2.40.0