tar bugfix patch n.347 (recoded, version 4)

Rob Landley rob at landley.net
Fri Dec 23 00:03:38 UTC 2005


On Thursday 22 December 2005 07:37, Vladimir N. Oleynik wrote:
> Roberto and Rob,
>
> >> Care to explain the comment?  Right now, we depend on exit() to clean
> >> up our memory most of the time.  The FEATURE_CLEAN_UP stuff is a
> >> debugging aid to find memory leaks in loops that might blow up into
> >> something significant with big data sets.  (We might later add
> >> infrastructure to allow busybox to not depend on a kernel with a
> >> working fork/exit, but that's 1.2 or later work and would require
> >> adding rather a lot of infrastructure that might best be done as a
> >> separate "fakefork.so" library (that wraps the fork() and exec()
> >> families, malloc(), free(), mmap(), mumap(), open(), close(), and
> >> probably a whole lot more...  Or perhaps fakefork belongs in uClibc?
> >> Who knows?)
>
> My reall busybox router have script:
>
> $ tar cf - /etc /bin/ /usr /home | ( cd /mnt/copy_here; tar xf - )
>
> for save configuration.
>
> Its make
> - double shell to memory
> - double tar to memory
>
> We can`t change fork() to vfork() trivially, this applets use BSS
> variables (prezeroed) and for vfork() is not separetelly.

If you vfork(), you must exec.  Period.  We can't mix vfork() and 
run_applet_by_name, it just won't work.

As for fork and vfork not being interchangeable, I'm currently writing up some 
busybox developer documentation on issues like this.

So far I've got "What are the goals of busybox" (talking about prioritizing 
and trading off size, simplicity, correctness, and speed).  "What 
environments do we run in" (talking about why we focus on the linux kernel, 
32 vs 64 bit and endianness issues, and nommu stuff), "The configuration 
menu" (explaining CONFIG_, CONFIG_FEATURE, ENABLE_, allbareconfig, minimizing 
ifdefs, and so on), and the bit on "How to vfork and fork differ".

Probably going to reorganize that a bit at some point, but I need to get it 
down first.

Rob
-- 
Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.



More information about the busybox mailing list