[systemd-devel] sigpwr.target - intended usage?

Clemens Gruber clemens.gruber at pqgruber.com
Mon Jul 18 13:17:55 UTC 2016


Hi,

On Mon, Jul 18, 2016 at 03:02:10PM +0200, Lennart Poettering wrote:
> Well, if they don't want to make SIGRTMIN+4 the default because they
> think sysvinit/Upstart is more relevant than systemd, then that's
> their right. But I think making the kill signal configurable per
> container would probably be a good idea. That's what we do in nspawn,
> where SIGRTMIN+3 is the default, but you can override it with
> --kill-signal= on the cmdline (or KillSignal= in .nspawn files), for
> compat with sysv.

I am also sending SIGPWR from a power related kernel module to PID 1 and
I hooked a service which calls "systemctl poweroff -f" to sigpwr.target.

If I instead send SIGRTMIN+4, this would be equivalent to calling
systemctl poweroff which takes too long in my use case (power loss
imminent due to overcurrent or undervoltage situations in an embedded
system, triggered by an interrupt. In the interrupt handler, I send the
SIGPWR signal at the moment).

Would sending SIGRTMIN+14 to PID 1 be identical to calling "systemctl
poweroff --force" ?

Thanks,
Clemens


More information about the systemd-devel mailing list