On Sat, Mar 23, 2013 at 12:53 AM, Bruno Cornec <br...@victoria.frmug.org> wrote:
> We are up to now using version 1.18.5, with the attached .config file to
> compile busybox. We have an inittab file containing:
>
...
> # Trap CTRL-ALT-DELETE
> null::ctrlaltdel:/sbin/reboot

Try removing "null". Init actions fail if opening of the tty fails.
Empty tty won't try opening anything, will reuse init's stdio:

::ctrlaltdel:/sbin/reboot

> I'm testing mostly on KVM VMs, and simulate the CTRL-ALT-DEL with the
> sendkey command from the monitor window.

You can simply run "kill -INT 1", it should do the same thing as C-A-Del:
C-A-Del only makes kernel send SIGINT to PID 1.

> So I'm surely doing something wrong, either in my inittab or in my
> config of busybox, but I don't see what.
> I even tried with the latest 1.20.2 (which I may use as the base for the
> next stable version) without more luck either.

I also can't see any obvious problems.

sigprocmask_allsigs(SIG_UNBLOCK);

> I read at
> http://lists.busybox.net/pipermail/busybox/2012-May/077855.html that a
> reason could be a non-busybox reboot but that's not our case.

You can replace "/sbin/reboot" with something benign like

/bin/touch /tmp/SIGINT_PID1_SEEN

> So I'm looking for advises on how to debug more, or any hint wrt my
> usage.

Other people report that init may have some of its signals blocked.
I am a bit skeptical, but it's easy to check. Find this place in init.c:

        die_sleep = 30 * 24*60*60;

        /* Figure out where the default console should be */
        console_init();

and add this line:

        reset_sighandlers_and_unblock_sigs();

 directly below "die_sleep =..." line.

Then rebuild, install, reboot, and try SIGINT'ing init again.
If it starts working after this modification, then it is indeed the case.
Let me know what kernel version do you use then.

-- 
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to