[Toybox] 3efd6d9512ac8c9370d62fcaa08d31c28bba1810 broke ps without a tty

enh enh at google.com
Fri Feb 3 17:04:22 PST 2017


(i've been trying to find time to look at this for days, but it's time
to admit to myself that i won't and report what i've found...)

the new truncation code
(https://github.com/landley/toybox/commit/3efd6d9512ac8c9370d62fcaa08d31c28bba1810)
looks great on a terminal, but has bad behavior if you're not:

./toybox nohup ./toybox ps -A -o
user:12=uid,pid,ppid,stime,tty,time,args=cmd ; ./toybox wc nohup.out

seems like we're padding to the bogus width of 99999 that's used for
non-tty output, but i haven't had time to investigate.

-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.


More information about the Toybox mailing list