Re: reboot bug fixed (NOT)
On Tue Mar 21, 2000 at 03:48:55AM -0500, Adam Di Carlo wrote:
>
> > Well, thanks to Erik I was able to fix the reboot problem, which also
> > explains why dbootstrap wasn't restarting when it was coring. Someone
> > turned on DEBUG_INIT in busybox init.c which was bad as that causes
> > that to ignore signals.
>
> No, it was never set, it's just that I'm a dufus. Feh. Sorry.
>
> Well, the reboot problem is real and I can reproduce it I guess. Sux.
Which is pretty odd. Afer passing through the pre-processor,
busybox reboot is simplified down to:
extern int reboot_main(int argc, char **argv)
{
exit(kill(1, 2 ));
}
And init.c (after the preprocessor) still has:
signal(12 , reboot_signal);
signal(2 , reboot_signal);
signal(15 , reboot_signal);
which when getting signal 2 calls:
static void reboot_signal(int sig)
{
shutdown_system();
message(0x2 | 0x1 , "Please stand by while rebooting the system.\r\n");
sync();
sleep(2);
reboot(0x01234567 );
exit(0);
}
so the only thing I can think of would be if shutdown_system()
was to block. After running 'reboot' from the command line
are new processes being spawned from init (i.e. if you exit your
shell does a new shell get spawned)? If so then something _very_
strange is going on such that init isn't getting the signal.
Also, what does 'kill 2 1' result in?
-Erik
--
Erik B. Andersen Web: http://www.xmission.com/~andersen/
email: andersee@debian.org
--This message was written using 73% post-consumer electrons--
Reply to: