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

Roberto A. Foglietta me at roberto.foglietta.name
Thu Dec 22 14:35:38 UTC 2005


Vladimir N. Oleynik ha scritto:
> 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.
> 

  vfork is used only for execve family, using it for others thing COULD 
serially left the sistem in unpredictable state, AFAIK:

  http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC5


>>  http://www.erlenstar.demon.co.uk/unix/faq_2.html
>>
>>  which document are talking about zombies too and how to preventing 
>> they happen. Solaris docs was read just because I worked on solaris hw 
>> but actually I do not have any such hw.
> 
> 
> This zombie have very small life. ;-)
> After parent readed last pipe buffer, parrent exited also.
> "Tar" is not a daemon server, using async sigchild handler is nonsense.
> You can found true Unix documentation with typically example with 
> fork()+pipe().
> 

  Even in the case

  find . -type file | xargs <something>

  which <something> belong to busybox, fork and fails with many zombies?
  Fast creation of big zombies should consume memory so fast that 
watchdog sw could miss to kill parent in time before system hang.

  I am not sure... may be it is true in my sick fantasy, only!
  ;-)


  Cheers,
-- 
Roberto A. Foglietta
http://www.roberto.foglietta.name
SkypeNick: robang74
ICQ#: 108718257



More information about the busybox mailing list