From 676e1d93cf3943cbbe91a0fad9b319cff9b136b1 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 4 May 2016 18:43:19 -0500 Subject: Elliott says -T should fetch threads even when not displaying thread fields. --- toys/posix/ps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toys/posix/ps.c b/toys/posix/ps.c index 7843ffa5..3a39353a 100644 --- a/toys/posix/ps.c +++ b/toys/posix/ps.c @@ -1134,7 +1134,8 @@ void ps_main(void) if (!(toys.optflags&(FLAG_k|FLAG_M))) TT.show_process = (void *)show_ps; TT.match_process = ps_match_process; dt = dirtree_read("/proc", - (TT.bits&(_PS_TID|_PS_TCNT)) ? get_threads : get_ps); + ((toys.optflags&FLAG_T) || (TT.bits&(_PS_TID|_PS_TCNT))) + ? get_threads : get_ps); if (toys.optflags&(FLAG_k|FLAG_M)) { struct carveup **tbsort = collate(TT.kcount, dt); -- cgit v1.2.3