[Toybox] ps -T -o name

Rob Landley rob at landley.net
Wed May 4 16:44:38 PDT 2016



On 05/04/2016 03:55 PM, enh wrote:
> seems like a bug that if you use -o but don't include 'tid', -T becomes a no-op?
> 
> ps -A -T | wc -l
> ps -A -T -o name | wc -l

The way I implemented it,

1) If you display tid, it fetches tid.
2) -T changes the default fields displayed.

I'm happy to implement different behavior, I'm just not familiar with
what it should be.

> should this
> 
>   dt = dirtree_read("/proc",
>     (TT.bits&(_PS_TID|_PS_TCNT)) ? get_threads : get_ps);
> 
> be
> 
>   dt = dirtree_read("/proc",
>     ((toys.optflags&FLAG_T) || (TT.bits&(_PS_TID|_PS_TCNT))) ?
> get_threads : get_ps);
> 
> ?

If you think that's a good idea...

Committed and pushed,

Rob



More information about the Toybox mailing list