On Sat, Oct 15, 2016 at 12:09 AM, Laurent Bercot <
ska-supervision_at_skarnet.org> wrote:
> So what I'd like to do is have "s6-svc -d" result in the process receiving
>> SIGINT and SIGCONT to the supervised process, rather than SIGTERM and
>> SIGCONT.
>>
>
> The problem with custom control is [...]
A bad script could make s6-supervise unresponsive and
> useless. I thought it was too much of a risk for the benefit it brings.
>
(Hunh, I tried sending this almost a week ago and it bounced. Strange.)
I concur. And it's not particularly important, as far as that goes -- as
you pointed out, using -Oic is arguably the right thing to do, because it's
more transparent about what is going on. The only reason I prefer "-d" is
that it's more symmetric with other managed services, and if the database
needs to be bounced in a hurry it's likely because of a crisis, and I hate
to increase the cognitive load on the operator who's trying to deal with
the hypothetical future crisis.
On the other hand, I can write a *really simple* control script that just
takes sysvinit-style "start," "stop", "reload" etc arguments and runs the
appropriate s6-svc command. Or, alternatively:
But there's a way to trap and convert signals in your run script itself:
> http://skarnet.org/software/execline/trap.html
I had totally missed the trap command! That provides a nice workaround.
Thank you! I'll try modifying the run script to use this approach and see
whether the result makes me happier than the control-script approach.
Cheers,
Brett
--
Brett Neumeier (bneumeier_at_gmail.com)
Received on Sun Oct 23 2016 - 20:00:39 UTC