On Thursday 03 January 2008 23:58, Harald Küthe wrote: > Hello list, > There exists a patch which is hanging around in our development tree for > ages now which we used to avoid zombie processes. > This is maybe related to some old stuff found here: > http://www.busybox.net/lists/busybox/2004-August/012422.html > Our inittab calls a startscript which is not ended during runtime, but > only when the settopbox shuts down. > > If you are interested, here's the patch. > ppc8xx/linux-2.4.35/libc-2.3.6/gcc-3.4.6. > > Best regards > Harald > > diff -Naur busybox-1.9.0/init/init.c busybox-1.9.0-dbox2/init/init.c > --- busybox-1.9.0/init/init.c 2007-12-21 23:00:32.000000000 +0100 > +++ busybox-1.9.0-dbox2/init/init.c 2008-01-03 23:35:45.000000000 +0000 > @@ -497,10 +497,12 @@ > int status, wpid; > > while (1) { > - wpid = waitpid(runpid, &status, 0); > - if (wpid == -1 && errno == EINTR) > + wpid = wait(&status); > + if (wpid >0 && wpid != runpid) { > continue; > - break; > + } > + if (wpid == runpid) > + break; > } > return wpid; > }
Applied, thanks! -- vda _______________________________________________ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox