On Thursday 29 October 2009 16:27, Mike Frysinger wrote:
> On Thursday 29 October 2009 10:55:50 ladislav klenovic wrote:
>
> please dont top post
>
> > As Detlef said I don't know have to specify that in inittab thus I run the
> > shell regardless whether there is or not a debug console.
> > I choose the tty0 according to busybox 1.2.2 which works fine for me. So
> > maybe some kind of configuration option which could
> > specify which device to use if no console is available would make sense.
>
> the only thing that might need checking is why init didnt back off on the
> respawn. sysvinit will wait 5 minutes if it hits ~10 failures in a 2 minute
> period. or maybe it does and your log didnt show init going to sleep.
Currently our init has simplistic one second delay before respawning.
/* Now run the looping stuff for the rest of forever.
*/
while (1) {
int maybe_WNOHANG;
maybe_WNOHANG = check_delayed_sigs();
/* (Re)run the respawn/askfirst stuff */
run_actions(RESPAWN | ASKFIRST);
maybe_WNOHANG |= check_delayed_sigs();
/* Don't consume all CPU time - sleep a bit */
=========> sleep(1);
maybe_WNOHANG |= check_delayed_sigs();
/* Wait for any child process(es) to exit.
*
* If check_delayed_sigs above reported that a signal
* was caught, wait will be nonblocking. This ensures
* that if SIGHUP has reloaded inittab, respawn and askfirst
* actions will not be delayed until next child death.
*/
if (maybe_WNOHANG)
maybe_WNOHANG = WNOHANG;
while (1) {
pid_t wpid;
struct init_action *a;
/* If signals happen _in_ the wait, they interrupt it,
* bb_signals_recursive_norestart set them up that way
*/
wpid = waitpid(-1, NULL, maybe_WNOHANG);
if (wpid <= 0)
break;
a = mark_terminated(wpid);
if (a) {
message(L_LOG, "process '%s' (pid %d) exited. "
"Scheduling for restart.",
a->command, wpid);
}
/* See if anyone else is waiting to be reaped */
maybe_WNOHANG = WNOHANG;
}
} /* while (1) */
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox