[2019-03-10 12:09] Andras Korn <korn-debb...@elan.rulez.org>
> On Fri, Mar 08, 2019 at 02:39:47PM +0000, Dmitry Bogatov wrote:
> > [2019-03-07 12:57] Andras Korn <korn-debb...@elan.rulez.org>
> > > part 1     text/plain                 218
> > > Sorry, I sent an earlier version of the patch by mistake.
> > >
> > > I'm attaching the correct one, which I tested and which works for me.
> > > [...]
> > > -      if (sigc && (stat(STOPIT, &s) != -1) && (s.st_mode & S_IXUSR)) {
> > > +      if ((sigp) || (sigc && (stat(STOPIT, &s) != -1) && (s.st_mode & 
> > > S_IXUSR))) {
> > 
> > As far as I can tell by glance on patch, you want SIGPWR trigger reboot.
> > If so, why don't you create REBOOT file in, say, /etc/rc.local and make
> > lxc controller to send SIGCONT?
>
> No -- I want SIGPWR to trigger a halt.
>
> For the purposes of LXC, any signal will do; I just need for a signal to
> trigger a shutdown regardless of the permissions on runit.stopit and
> runit.reboot.

Halt. Fine. But why can't you pre-provision you container with apporiate
`stop.*' file with apporiate permissions?

> > By the way, SIGPWR is not in POSIX, according to signal(7).
>
> You're right; in that case, maybe we can use SIGQUIT?

SIGTERM feels better, imho. TERM is graceful termination, while SIGQUIT
creates coredump. By default.

But this naming only matters if you explain to me, how solution not
involving changing C code does not suffice. Two lines for convenience in
this case, three there -- and we all know where it ends.
-- 
        Note, that I send and fetch email in batch, once every 24 hours.
                 If matter is urgent, try https://t.me/kaction
                                                                             --

Reply via email to