Re: s6-svscan & SIGPWR

2016-03-15 Thread Jan Olszak
Thanks everybody!

We'll go with the BusyBox convention.

On Mon, Mar 14, 2016 at 8:07 PM, Laurent Bercot  wrote:

> On 14/03/2016 19:45, Brian Shore wrote:
>
>> Alternatively, change LXC's behavior via the configuraiton file.  We
>> use the following with runit (which expects SIGCONT for shutdown):
>>
>> lxc.haltsignal = SIGCONT
>> lxc.stopsignal = SIGCONT
>>
>
>  Even better ! :)
>
> --
>  Laurent
>
>


Re: s6-svscan & SIGPWR

2016-03-14 Thread Laurent Bercot

On 14/03/2016 19:45, Brian Shore wrote:

Alternatively, change LXC's behavior via the configuraiton file.  We
use the following with runit (which expects SIGCONT for shutdown):

lxc.haltsignal = SIGCONT
lxc.stopsignal = SIGCONT


 Even better ! :)

--
 Laurent



Re: s6-svscan & SIGPWR

2016-03-14 Thread Jan Bramkamp

On 14/03/16 17:42, Jan Olszak wrote:

Hi!
We're running s6 in an lxc container.

lxc-stop sends SIGPWR to the init process (s6-svscan) to stop the
container, but SIGPWR isn't handled. It just gets discarded as if nothing
happened.

Is there a reason it works this way?

Thanks!
Jan



Probably because it masks all signals, whitelists signals the authors 
though about and offers to proxy those to scripts. After all s6-svscan 
is designed to be a good pid 1 and exiting from an default signal 
results in an instant kernel panic. The correct solution would be to 
teach s6-svscan about SIGPWR and proxy it to .s6-svscan/SIGPWR.