[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] Add halt handler for SIGPWR
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2013-11-26 13:15:56
Message-ID: CAK1hOcNYOY7UnF3gyJcYLaaqy6U_rMuB=2bsQuJmL3_39PnidQ () mail ! gmail ! com
[Download RAW message or body]

Applied, thanks!

On Tue, Nov 26, 2013 at 10:17 AM, Bogdan Purcareata
<bogdan.purcareata@freescale.com> wrote:
> Most init processes implement a handler for SIGPWR that gracefully
> stops all child processes when shutting down a machine. Some other
> technologies rely on this signal - e.g. Busybox powered LXC
> containers.
>
> This patch makes busybox init halt when receiving SIGPWR.
>
> Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
> ---
>  init/init.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/init/init.c b/init/init.c
> index c63bba1..ab1c5c2 100644
> --- a/init/init.c
> +++ b/init/init.c
> @@ -1135,6 +1135,7 @@ int init_main(int argc UNUSED_PARAM, char **argv)
>                 struct sigaction sa;
>
>                 bb_signals(0
> +                       + (1 << SIGPWR)  /* halt */
>                         + (1 << SIGUSR1) /* halt */
>                         + (1 << SIGTERM) /* reboot */
>                         + (1 << SIGUSR2) /* poweroff */
> --
> 1.7.10.4
>
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
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