[BusyBox] another hush fix
Larry Doolittle
ldoolitt at recycle.lbl.gov
Thu Jun 7 12:43:38 UTC 2001
Erik wrote:
> hush is now 26k, vs 19k for lash. I am tempted to remove lash
> all together. There is nothing that lash does that hush does
> not do better at this point.
To which Tom responded:
> You may want to leave it in there for those people that need only a
> _BASIC_LEVEL_ shell, and have tighter space constraints.
And then Erik came back with:
> Some carefully placed #defines in hush can also do this job.
I'm not convinced that hush should have #defines added.
While it's not spaghetti code (I've seen plenty of that)
it is relatively tightly woven, and a lot of the features
don't take up nearly as much space as the basic infrastructure.
It would make more sense to strip _lash_ down, such as getting
rid of backticks and if/then/else/fi handling, that don't really
work right anyway. Then see if any of the bug fixes for hush,
like setpgrgp calls, can be back-ported for lash. Lash would
end up smaller, simpler, and still usable for truly low end work.
I haven't checked, but I suspect lash handles interrupts better.
Hush probably leaks memory if you do something like
$ if true; then
> (echo foo; cat bar
> ^C
$
Hmmm. It's worse than that. ^C doesn't even get you back to
the "$" prompt! You _have_ to give the "); fi" to get out.
The going rate for Flash is what, about $10/MB? That means
hush costs about 5 cents per copy more than lash. What's the
estimate of the unit shipments of embedded Linux next year?
- Larry
More information about the busybox
mailing list