[PATCH] init.c, halt command not working
Harald Kuethe
harald-tuxbox at arcor.de
Thu Apr 3 14:33:27 PDT 2008
> ----- Original Message -----
> From: "Denys Vlasenko" <vda.linux at googlemail.com>
> To: "Harald Kuethe" <harald-tuxbox at arcor.de>
> Cc: <busybox at busybox.net>
> Sent: Wednesday, April 02, 2008 11:41 PM
> Subject: Re: [PATCH] init.c, halt command not working
...
> kill() returns 0 (success), so the system thinks that SIGTERM is delivered.
> But init does not print your debug message. Very strange.
> killall did the very same thing: "kill(1, SIGTERM)" and it worked...
> Please try attached idagnostic patch.
> It will spam your console if it will detect that init
> has TERM blocked or set to unexpected handler.
> Try to "kill 1" and "kill -USR1 1" and report what init says.
> --
> vda
This patch adds no additional output :-/
I put some more debugging output into the init_main function to find out where it hangs.
It showed that init_main does not return from the run_actions(ASKFIRST); call,
this explains that the additional diagnostics didn't come up.
Following lines are copied from our inittab:
...
::askfirst:-/bin/sh
vc/2::askfirst:-/bin/sh
vc/3::askfirst:-/bin/sh
...
It looks as if the init process is replaced by the shell without finishing generating the virtual consoles and waiting in the while loop
because there are only 2 init processes here (there were some more (one for each vc) with the fork() instead of the vfork())
Regards
Harald
More information about the busybox
mailing list