[PATCH] init.c, halt command not working
Denys Vlasenko
vda.linux at googlemail.com
Sat Apr 5 04:23:17 UTC 2008
On Friday 04 April 2008 22:40, Harald Kuethe wrote:
> The first part is with a vfork() call in static pid_t run(const struct init_action *a)
> the second part uses fork()
>
> Freeing unused kernel memory: 68k init
> *Start init_main
> init: waiting for 10
> *console_init
> init started
> init started: BusyBox v1.10.0 (2008-04-01 22:01:03 CEST)
> *single?
> *run_actions
> init: before waitfor(run(a))
> init: run vfork returned 0
> init: run vfork returned 11
> *call bb_signals
> init: waiting for 11
>
> ...
>
> init: after waitfor(run(a))
> *signals
> *RESPAWN
> *ASKFIRST
> init: before a->pid = run(a)
> init: run vfork returned 0
>
> Please press Enter to activate this console.
> init: run vfork returned 80
if (BB_MMU && (a->action_type & ASKFIRST)) {
static const char press_enter[] ALIGN1 =
#ifdef CUSTOMIZED_BANNER
#include CUSTOMIZED_BANNER
#endif
"\nPlease press Enter to activate this console. ";
char c;
/*
* Save memory by not exec-ing anything large (like a shell)
* before the user wants it. This is critical if swap is not
* enabled and the system has low memory. Generally this will
* be run on the second virtual console, and the first will
* be allowed to start a shell or whatever an init script
* specifies.
*/
messageD(L_LOG, "waiting for enter to start '%s'"
"(pid %d, tty '%s')\n",
a->command, getpid(), a->terminal);
full_write(1, press_enter, sizeof(press_enter) - 1);
while (safe_read(0, &c, 1) == 1 && c != '\n')
continue;
}
DOH!
Try this patch.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.patch
Type: text/x-diff
Size: 3010 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080405/3f780a7f/attachment.bin
More information about the busybox
mailing list