[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: /sbin/reboot does SIGINT and not SIGTERM?
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2012-05-18 0:29:44
Message-ID: 201205180229.44804.vda.linux () googlemail ! com
[Download RAW message or body]
On Thursday 17 May 2012 05:06, Michael J. Hammel wrote:
> I was trying to get rcK to run to shutdown gracefully and noticed that
> the inittab should use SHUTDOWN for the action. If I run /sbin/reboot
> this causes a SIGINT, which doesn't cause the rcK to get run. If I do
> kill -15 1 then rcK gets run and I get a reboot.
>
> Is this the intended action for /sbin/reboot or am I doing something
> wrong here? poweroff also doesn't do SIGTERM for init.
Looks like you are using /sbin/reboot which is not from busybox.
Busybox code:
static const smallint signals[] = { SIGUSR1, SIGUSR2, SIGTERM };
int delay = 0;
int which, flags, rc;
/* Figure out which applet we're running */
for (which = 0; "hpr"[which] != applet_name[0]; which++)
continue;
Thus, SIGUSR1, SIGUSR2, SIGTERM are sent by halt, poweroff and reboot.
SIGINT is sent to init by Ctrl-Alt-Del (on x86).
> I'm using Busybox 1.19.4. My relevant inittab lines are:
>
> # Stuff to do for the 3-finger salute
> ::ctrlaltdel:/sbin/reboot
Looks like in your case Ctrl-Alt-Del will cause SIGINT,
which in turn will cause /sbin/reboot to be run.
If your /sbin/reboot is from bbox, it should send SIGTERM.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic