[BusyBox] built-in commands problem

Rob Landley rob at landley.net
Fri Sep 24 07:58:30 UTC 2004


On Thursday 23 September 2004 06:14, Thomas Voegtle wrote:
> > CONFIG_FEATURE_SH_STANDALONE_SHELL works so:
> > if the necessary applet is present at the current process,
> > test of call from the "/bin/busybox applet" is carried out.
> > You have not /bin/busybox or your /bin/busybox have not dmegs applet.
> > The algorithm with call "/proc/self/exe" have changed to "/bin/busibox"
> > special for ucLinux, this system have not /proc/self/exe.
>
> OK, thank you, now it works.
>
> Created a small patch:

The fundamental problem is that our shells aren't reentrant, so when they want 
to run stuff they exec /bin/busybox (which may not be there in a chroot 
environment, etc.  Even /proc/self/exe won't help here if the original 
executable isn't accessable, such as a chroot from a uclibc boot disk to a 
damaged glibc root partition you want to repair.  Hence wanting to use the 
built-in commands in the first place...)

It would be nice if you could re-exec your current process, but there doesn't 
seem to be a way to do it, even playing with /proc.  The alternative to 
properly fix this is to make ash reentrant, which looks like a couple months 
work (and on my to-do list for maybe around 2008. :)

Rob
-- 
www.linucon.org: Linux Expo and Science Fiction Convention
October 8-10, 2004 in Austin Texas.  (I'm the con chair.)




More information about the busybox mailing list