busybox shells

Denys Vlasenko vda.linux at googlemail.com
Mon Jul 28 00:16:48 UTC 2008


On Monday 14 July 2008 23:16, Denys Vlasenko wrote:
> On Friday 04 July 2008 19:31, Robin Getz wrote:
> > This is why I was asking...
> > 
> > http://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=28371
> 
> Yes... I heard that msh is not 8bit friendly.
> 
> I have "case" statement support 70% working for hush.
> That is, it is parsed and executed, but match is done
> with just string compare for now. The syntax was a bitch
> to parse, but now it seems to work, and costs only
> ~300 bytes. Also documented how parsing works.

Was slowed down a bit by shocking discovery that ash
can redirect only fd's 0..9! By design! Had to fix
the design...

This was uncovered by the attempt to start eating my own dogfood
by symlinking /bin/sh -> ash. I told myself "let's see what'll
break after reboot." But breakage started even before that -
*reboot script* failed because of the above problem.


Anyway. After that distraction was gone (and ash dogfood eating
was postponed), I just committed the above case-for-hush
to svn, seems to work in my limited testing. Inevitably,
a few bugs will show up...


Meanwhile, a msh bug is closed:
http://bugs.busybox.net/view.php?id=3884

And yet another ash bug is solved, waiting user's ACK:
http://bugs.busybox.net/view.php?id=4324


> When that will be fully done, I will need to work
> on break/continue statements' support if I want hush
> to match msh capabilities there too.
> 
> I think I can implement functions without too much an effort;
> also have ideas how to prevent infamous pipe overflow on NOMMU.
> Try this:
> 
> yes "0123456789012345678901234567890" | dd bs=32 count=64k >TESTFILE
> huge=`cat TESTFILE` # will block here forever
> 
> Fails for both msh and hush because of parent being blocked
> by vfork().

In your opinion, which of the above is more important?
--
vda



More information about the busybox mailing list