[BusyBox] Reboot not working?

Erik Andersen andersen at codepoet.org
Sat Nov 10 05:36:47 UTC 2001


On Thu Nov 08, 2001 at 03:11:05PM -0500, Adam Slattery wrote:
> > The reboot/halt applets in busybox normally rely on the init applet being
> > turned on, as they just send a signal to it to trigger the reboot/halt.
> > I'm attaching the patch I use against 0.60.1 to make reboot/halt call the
> > syscall directly if the init applet is turned off.
> 
> Actually, this is the proper way :). reboot/halt/poweroff should always
> call the syscall, not init. When init calls it, the kernel thinks init is
> exiting and thus generates a kernel panic.

Actually, that is not the proper way at all.  :)  sysvinit calls
the reboot syscall itself.  The sysvinit reboot command just
sends a message to the init process (via a named pipe) and the init
process then proceeds to shut things down.  This allows the init
process to inform all the apps that they should perform a
gracefull shutdown and gives them a few seconds to cleanup.

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--





More information about the busybox mailing list