[Aboriginal] [Toybox] 3efd6d9512ac8c9370d62fcaa08d31c28bba1810 broke ps without a tty

Rob Landley rob at landley.net
Sat Feb 4 09:27:47 PST 2017


On 02/03/2017 07:04 PM, enh wrote:
> (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...)

I actually found that yesterday but haven't checked in a fix yet.

The main holdup on cutting the toybox release has been that aboriginal
linux hasn't been a functional test bed to find obvious regressions like
this for a while, so I've been banging on
https://github.com/richfelker/musl-cross-make to get toolchains out of
that (using the attached build script), then banging on
https://github.com/landley/mkroot to get it up to speed as a root
filesystem builder, and now I'm trying to figure out what the kernel
build script part should look like. (So far I still need 2/3 of the old
sources/targets from aboriginal, although maybe I can do it as an
if/else staircase in one script.)

And I got far enough to notice that ps was nuts on a serial console,
because setting the default width to 99999 _without_ setting FLAG_w
cause it to try to _pad_ each line out to 99999 with spaces.

Oops.

If the size probe fails I can set the default width to 80 instead of
99999, or I can set FLAG_w. Not sure which is better yet. (With 80 the
columns would at least line up,and you can always export COLUMNS=123 if
you need a specific different size.

In theory the ANSI size probe should go in here somewhere. In practice
we're not already reading data from stdin so parsing the results isn't a
natural part of the program flow.

(I note that top is also glitched without a tty. I suspect receipt of
the ansi probe causes a redraw... which sends out a new ansi probe.)

Moral of the story: don't let your main test environment fall too far
behind or stupid stuff accumulates. I'm working on it...

Rob

P.S. I've spent hours trying to come up with a proper news entry for
aboriginal that covers why I ended the project and what I'm replacing it
with, but
http://lists.landley.net/pipermail/aboriginal-landley.net/2017-January/002594.html
is the closest I've come up with so far.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: all2.sh
Type: application/x-shellscript
Size: 1893 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/aboriginal-landley.net/attachments/20170204/30beb4b6/attachment.bin>


More information about the Aboriginal mailing list