[systemd-devel] Clarification on notify-reload and SIGHUP handling

Luca Boccassi luca.boccassi at gmail.com
Sat Feb 8 23:43:47 UTC 2025


On Sat, 8 Feb 2025 at 22:57, Łukasz Niemier <lukasz at niemier.pl> wrote:
>
> I am working on Erlang-native implementation of libsystemd-like interface (for the integration layer only). And right now I started working on integrating `notify-reload`, but I have encountered an issue. When I am running `systemctl reload echo` with my integration then I see weird behaviour:
> - SIGHUP is received
> - `RELOADING=1` message is sent
> - after five seconds I send `READY=1` message
>
> However systemd is still reporting that the service is reloading. This behaviour do not occur when I try to run `kill -HUP <pid>` or when I manually send both messages from the process.

You also need to send MONOTONIC_USEC, see:

https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html#MONOTONIC_USEC=%E2%80%A6


More information about the systemd-devel mailing list