[BusyBox] proposed patch for busybox init

Vladimir N. Oleynik dzo at simtreas.ru
Thu Oct 3 06:57:04 UTC 2002


Ben,

> >>We hit a problem where orphaned processes were being created faster than
> >>the busybox init was reaping them, since it seemed that init was reaping
> >>no faster than once a second.  The enclosed patch attempts to remedy this
> >>by waiting for as many processes as are currently waiting to be reaped
> >>whenever at least one is ready to be reaped.  The change was designed to
> >>be as minimal as possible, so it may be possible to simplify it further
> >>by making other changes.
> >
> >
> > Hmm. Interesting idea.
> > I have other idea:
> >
> > + signal(SIGCHLD, SIG_DFL);
> > sleep(1); change to pause();
> > wait() + while(1) + waipid() change to while (waitpid()>0)
> 
> If I understand the suggestion, couldn't that also be done by just
> eliminating the original sleep(1).  I thought one of the concerns
> was that init shouldn't suck all of the cpu by continually respawning
> a process that immediately fails.

O... Yes.


--w
vodz



More information about the busybox mailing list