[BusyBox] Problems with ash exec

Matt Kraai kraai at alumni.carnegiemellon.edu
Sun Aug 26 15:36:29 UTC 2001


On Sun, Aug 26, 2001 at 09:12:00PM +0400, Vladimir N. Oleynik wrote:
> > When ash's exec command is used, it calls run_applet_by_name for
> > each component in the path with the full pathname, until it finds
> > the applet.  The first time it is called, it fails to find the
> > applet (since it is specified with a full pathname), and resets
> > recurse_level to 0.  On the next attempt, it falls back to
> > busybox.  It bumps argv and tries to find the command, which
> > fails, and it prints the usage message.
> > 
> > The least intrusive solution is to modify run_applet_by_name to
> > decrement, rather than reset, recurse_level.
> 
> And as you concern to such addition of small convenience? 
> It is required only 32 additional bytes. 
> After this patch both variants will give identical result:
> 
> $ busybox --help applet
> $ busybox applet --help

This seems like a good feature to me (though Erik obviously has
the final say).  Would it be possible to modify busybox_main
instead?  I'm planning to simplify run_applet_by_name, and the
less I have to move around the better.

Matt





More information about the busybox mailing list