Re: halt: init exits/panic

From: Nico Schottelius
Date: Tue Oct 04 2005 - 02:38:23 EST


Coywolf Qi Hunt [Sun, Jul 10, 2005 at 01:09:22AM +0800]:
> On 7/9/05, Nico Schottelius <nico-kernel@xxxxxxxxxxxxxxx> wrote:
> > Hello!
> >
> > What's the 'correct behaviour' of an init system, if someone wants
> > to shutdown the system?
> >
> > I currently do:
> >
> > - call reboot(RB_POWER_OFF/RB_AUTOBOOT/RB_HALT_SYSTEM)
> > - _exit(0)
> >
> > Is this exit() call wrong? If I do RB_HALT_SYSTEM and _exit(0) after,
> > the kernel panics.
>
> What the panic shows?

To be fully correct:

"Kernel panic - not syncing: Attempted to kill init" (from the last time
I tried, 2.6.13.2)

Perhaps _exit(0) is not correct for an init system?
This at least explains why it always looks like nothing is synced.

Nico

--
Latest project: cconfig (http://nico.schotteli.us/papers/linux/cconfig/)
Open Source nutures open minds and free, creative developers.

Attachment: signature.asc
Description: Digital signature