[BusyBox] builtin echo for ash

Riku Voipio riku.voipio at iki.fi
Sun Aug 7 11:28:35 UTC 2005

On Sat, Aug 06, 2005 at 10:33:16PM -0500, Rob Landley wrote:
> On Saturday 06 August 2005 17:26, Shaun Jackman wrote:
> > I'd guess the primary reason for the performance difference here is
> > the fork(2) call.
> > The typical solution in *nix was to provide a shell built-in as Paul
> > has done. Busybox is in the unique position of being able to provide
> > another solution, namely
> > optionally providing a bb_fork() via longjmp implementation.
> I realise you think that's the greatest thing since sliced bread, but what 
> I've cared about for a while is that it should be possible for the 
> "standalone shell" to just call applets as functions (which they are) and 
> have them return sanely.  (And _that_ is why I care about the cleanup stuff.)

That would be really neat. I have created busybox with a few most common 
applets called directly, which seemed to increase speed quite a bit.
However, it would be  ugly to add all the applets to builtincmd[] table of

> The setjmp/longjmp stuff there is completely unnecessary complication and a 
> hack for systems that have had lobotomies in the name of space.

longjmp seems to be necessary to replace bb_error_msg_and_die from 
some places, like syntax() in coreutils/test.c. Which risks 
leaving static variables at a unexpected state. Is that what the
cleanup work is about?

More information about the busybox mailing list