[BusyBox] Problems with ash exec

Vladimir N. Oleynik dzo at simtreas.ru
Mon Aug 27 07:04:38 UTC 2001


Matt Kraai wrote:
> 
> 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 not found simplifys for busybox_main() ...
But may reduce been_there_done_that from applets.c and static declare in
busybox.c
(gain 8 bytes)

> I'm planning to simplify run_applet_by_name, and the
> less I have to move around the better.


--w
vodz





More information about the busybox mailing list