[systemd-devel] custom var in sd_notify

aleivag aleivag at gmail.com
Mon Feb 26 14:43:25 UTC 2018


It make sense, Thank you for the clarification!

El 25 feb. 2018 10:09 p. m., "Mantas Mikulėnas" <grawity at gmail.com>
escribió:

On Mon, Feb 26, 2018 at 12:32 AM, aleivag <aleivag at gmail.com> wrote:

> Hi all, hope you are doing:
>
> i was toying aroud sd_notify and sd-daemon.h and found this section in
> https://github.com/systemd/systemd/blob/master/src/system
> d/sd-daemon.h#L234-L235 it said:
>
> Daemons can choose to send additional variables. However, it is recommended
> to prefix variable names not listed above with X_.
> So naturally i tried
>
> sd_notify(0, "X_ANSWER=42")
>
> and apparently systemd has no problem with that, but my questions are 2
> now:
>
> 1) What does systemd do with this information?
>

Nothing. The documentation just says in other words that "the init system
must not reject packets with unknown variables", but doesn't say that
systemd or any other init will store all of them anywhere.

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180226/02486279/attachment.html>


More information about the systemd-devel mailing list