diff options
Diffstat (limited to 'toys/posix')
-rw-r--r-- | toys/posix/ps.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |