[Toybox] [musl] Re: toybox: Rough edges in pending
Rob Landley
rob at landley.net
Tue Mar 19 23:22:05 PDT 2013
On 03/19/2013 02:32:21 PM, Isaac Dunham wrote:
> A couple things that would have cleared this up for me--
> Either a note in toys/pending/README that said:
> "Code in this directory may or may not work." (somehow, "...await
> review
> and/or cleanup" doesn't seem to communicate this)
Good point. I'll add a note.
> or a "CONFIG_WORKING" that prevents enabling toys that are
> nonfunctional without
> realizing it (iirc, the kernel has a trick along these lines, so make
> allyesconfig
> doesn't turn _everything_ on).
The rule has been that "default n" means it's not ready.
(My current corner case here is "who", which works as advertised but
posix says it should support a bunch of options that it doesnt' yet,
and I don't want to make it default y and forget to add them. But when
I say "a bunch" I mean "-abdHlmpqrstTu" which I haven't had time to
just sit down and implement yet, and possibly we want to document a
variance and go "really, this is minicomputer stuff, modern systems
don't usually have lots of multiple simultaneous users without
containers anymore...")
> > > Also, when toybox is built with musl, and toybox sh executes ls,
> > > I get a hang; strace indicates that something funny is going on:
> >
> > I am honestly amazed it got _that_ far.
> >
> > > I anticipate this is a bug in musl, so I'll cross-post.
> >
> > If toysh _isn't_ corrupting the heap or something similar, I'd be
> > stunned. It's not a real command yet.
>
> Surprisingly enough, it makes it far enough to give the illusion it
> might be usable.
It's an illusion. It's using toybuf for parsing so the command line
can't be longer than 4k (kernel limit's 128k and I've seen patches
raise it), it has no environment variable support, can't parse quotes
(which turns out to be quite funky because "$(echo "hello world")" has
nested quote contexts), no flow control implemented yet (if, while,
shell functions...), no &&, ||, or pipeline support...
And so on, and so forth... One of my current half-finished pending
things I haven't even bothered to check in yet is test.c (which
implements [ and [[ the way "bc" shares code with $(())), and once I've
got that I can dink at toysh a bit and at least redo the parsing.
Anyway, not a musl thing. Feel free to poke me just on the toybox list
if you think i should take a weekend and make toysh suck less, but the
_scope_ of the shell promblem is...
http://landley.net/notes-2006.html#31-08-2006
http://landley.net/notes-2006.html#10-09-2006
http://landley.net/notes-2007.html#20-01-2007
http://landley.net/notes-2007.html#19-10-2007
Stuff.
Rob
1363760525.0
More information about the Toybox
mailing list