[systemd-devel] shutdown: how to tell systemd to stop a service before killing other processes

Hans-Dieter Doll Hans-Dieter.Doll at drb.insel.de
Mon Aug 26 14:23:50 UTC 2019


> typically that issue is a sign of bad design and just worked by luck
> with a simple init system lacking of concepts for service states
well, the design is from last century :-)

> you should split your stuff into multiple systemd units and pack them
> into a target instead wrap a dozen of more or less independent things
> in a single unit

The programs in question are interaktive programs (like an editor),
which are called by different users several times in parallel with
parameters they want.
(The programs attach to the supervisor process via shared memory)

I'm new to systemd, but I don't think I can write units for this.

But if systemd kills these processes first with a SIGTERM and only
after some time with SIGKILL, I could catch SIGTERM and can orderly
terminate the processes. This would solve our problem.

I assume systemd does it this way, right?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190826/6c917b05/attachment.sig>


More information about the systemd-devel mailing list