[systemd-devel] Fwd: [Pkg-systemd-maintainers] Bug#732157: Want SIGSTOP-style daemon/service readiness notification

Kay Sievers kay at vrfy.org
Sat Dec 14 20:05:21 PST 2013


On Sat, Dec 14, 2013 at 11:19 PM, Shawn Landden <shawn at churchofgit.com> wrote:

> It would be nice if systemd could implement the service supervisor
> side of the service readiness protocol that upstart calls "expect
> stop":
>
> The service doesn't fork, and when considers itself ready it raises
> SIGSTOP.  The supervisor can observe this via the usual mechanisms,
> being the service's parent, and when it occurs it sends the service
> CONT and starts whatever was waiting for readiness.
>
> The sd_notify(3) protocol is just about tolerable, and it is good that
> it's documented, but it is quite unattractive for a daemon author:
> Either they have to add a build- and runtime- dependency on a
> systemd-specific library, or they have to reimplement a fairly tedious
> piece of socket code.
>
> For a daemon author, raise(SIGSTOP) is lovely and simple.
>
> I guess this would be a new "Type" (but I'm still halfway through the
> docs so no expert).

No, it's not lovely, it's a very cheap and very bad hack. These
signals are for admins and not for system management tools; just the
same way ptrace is the very wrong tool to track startup behavior of
services.

It is just so wrong to things like that, and systemd should not do that.

Kay


More information about the systemd-devel mailing list