[Toybox] ps and top (and Android)

Rob Landley rob at landley.net
Sun Apr 24 16:11:20 PDT 2016



On 04/24/2016 10:48 AM, enh wrote:
> On Sat, Apr 23, 2016 at 11:53 PM, Isaac Dunham <ibid.ag at gmail.com> wrote:
>> On Sat, Apr 23, 2016 at 09:57:12AM -0700, enh wrote:
>> IIRC, I heard that unlink was intended to avoid the need to sanity-check
>> and escape file names:
>> to delete a file named '-h' or '-f', just run 'unlink -h'/'unlink -f'.
>> Of course, GNU mis-implemented it, so it's useless if it's compatible.
> 
> if that was the intention, it's useless anyway, given the
> posix-specified -- for all argument parsing.

About that:

$ echo -- hello
-- hello
$ /bin/echo -- hello
-- hello

_I'm_ doing it, but the gnu tools aren't, and nobody seems to have cared.

Posix does not seem to be aware that it's been losing traction for a
while now. My own last attempt to engage with the posix mailinglist made
it as far as:

http://thread.gmane.org/gmane.comp.standards.posix.austin.general/12181/focus=12203

To which the author of cdrecord replied:

http://article.gmane.org/gmane.comp.standards.posix.austin.general/12203

(For reference,that would be this guy:
https://lists.debian.org/debian-devel/2004/10/msg00487.html .)

At which point I washed my hands of them and retreated to my blog to
grumble:

http://landley.net/notes-2016.html#11-03-2016

And I'm just... not posting to the posix mailing list anymore. I'm not
trying to fix it, I'm documenting where I deviate from it and moving on.
(I believe Rich Felker, who has a stronger stomach and more social
skills than I do, is still engaging with them.)

That said, there should be _A_ standard. Somewhere. LSB isn't it. Posix
is losing it. Maybe when we've finally got android self-hosting somebody
should document the minimal set of interfaces necessary to run the
build, or some such...

> (that they added this so late just makes it even more stupid. but
> that's about what you'd expect from posix...)

Yeah, ln and rm are superior commands, i was just worried existing build
scripts might use the old ones. But if so, those scripts can be fixed...

>>> what we really don't have is /usr/share/misc/pci.ids.
>> See:
>> http://pci-ids.ucw.cz/v2.2/pci.ids
>> http://pciids.sourceforge.net/v2.2/pci.ids
>> (Optionally add .gz/.bz2 for the compressed version.)
>>
>> Dual license, GPL2+ or 3-clause BSD.
> 
> what i meant is "folks would notice if i shipped an extra megabyte of
> useless data". even the half megabyte of usb ids, which would be
> somewhat useful, seems excessive.

I should make it so they can be gzipped on the filesystem and it
internally zcats them. (Not that this necessarily helps, but it's really
easy to code once zcat is promoted: just check a second filename, xrun()
a zcat instance on that file, and read from the output pipeline instead
of the file. Internally lsusb/lspci would need to cache the data instead
of lseek() and reread the file, but that's easy enough...)

But that would still mean shipping 190k of data for lsusb, which isn't
exactly free...

Rob



More information about the Toybox mailing list