> ----- Original Message -----
> From: "Denys Vlasenko" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Cc: "Harald Küthe" <[EMAIL PROTECTED]>
> Sent: Monday, March 31, 2008 9:52 PM
> Subject: Re: [PATCH] init.c, halt command not working
> On Monday 31 March 2008 21:59, Harald Küthe wrote:
> > > The sequence of events is:
> > > SIGUSR1 is received
> > > halt_reboot_pwoff(SIGUSR1) calls
> > > kill_all_processes() calls
> > > run_actions(SHUTDOWN):
> > > if (a->action_type & (SYSINIT | WAIT |
> > CTRLALTDEL | SHUTDOWN | RESTART)) {
> > > waitfor(run(a));
> > > delete_init_action(a);
> > > run(a) vforks... and this is somehow doesn't work very well
> >
> > It looks as if SIGUSR1 is !!not!! received because halt_reboot_pwoff()
> > is not processed.
> Please confirm that you added a debug printout to
> halt_reboot_pwoff and it is not triggering when halt
> sends SIGUSR1 to init.
Yes, confirmed!
> In this case, can you do this change int init.c:
> static pid_t run(const struct init_action *a)
> {
> ...
> if (pid)
> +{
> + bb_signals(0
> + + (1 << SIGUSR1) /* halt */
> + + (1 << SIGUSR2) /* poweroff */
> + + (1 << SIGTERM) /* reboot */
> + , halt_reboot_pwoff);
> return pid;
> +}
> Basically, it restores SIGUSR1 handling in the parent
> after child sets it to SIG_DFL.
> Does this fix things?
No, it stays the same.
> --
> vda
One interesting thing is that a <killall init> lets the system shut down and
restart.
Regards
Harald
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox