tar bugfix patch n.347 (recoded, version 4)
rob at landley.net
Fri Dec 23 05:40:07 UTC 2005
On Thursday 22 December 2005 08:35, Roberto A. Foglietta wrote:
> vfork is used only for execve family, using it for others thing COULD
> serially left the sistem in unpredictable state, AFAIK:
Please don't keep quoting this thing at us. I read it a long time ago, and
it's a marvelous example of a little knowledge being a dangerous thing.
> >> 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>
Considering that any sane xargs implementation will supply _all_ the arguments
on one single line to a single instantiation of something (unless you tell it
otherwise via command line arguments to xargs), then at most this would
create one zombie.
The zombie would be created by your shell's pipe handling, not by busybox,
since xargs will _exec_ "something" after it sets up the appropriate
environment, so there's no fork of a new process there. If your shell is
creating zombies, something is wrong with your shell.
All you have to do to _stop_ creating zombies is set sigchld to IGNORE and
they clean up after themselves (although their return value is never
delivered to you).
> which <something> belong to busybox, fork and fails with many zombies?
A) Anything that would create zombies with xargs would create zombies without
B) what if you do "cat /dev/zero > /dev/hda" as root? The ability to come up
with a contived example of something dangerous you might be able to do with
enough effort does not mean that we care.
> Fast creation of big zombies should consume memory so fast that
> watchdog sw could miss to kill parent in time before system hang.
Watchdog is a kernel function. (Even software watchdog should still be quite
happy to reboot the system from a solid OOM hang caused by a lack of OOM
killer.) Of course the out of memory killer is also a kernel function, and
the only way to not have it kick in would be to explicitly disable it.
> I am not sure... may be it is true in my sick fantasy, only!
It's getting kind of annoying, really. What is your real world objection,
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