[systemd-devel] path service ExecStart arguments

Lennart Poettering lennart at poettering.net
Thu Sep 22 08:35:15 UTC 2022


On Mi, 21.09.22 08:54, Ted Toth (txtoth at gmail.com) wrote:

> Is info about what changed (i.e. the name of the file created in the
> directory) available to a path service ExecStart process? If so, how
> does a service access the info?

This is is generally not available on released versions of
systemd. Current git main added some limited support for passing this
in via env var, but this is useful for debugging only really, since
multiple events can result in a single service invocation, and thus
you lose events.

Usually if you want this information for anything more than debugging,
then things should be implemented differently, i.e. you get called and
then scan yourself what is in the directory you watch. That makes
things robust towards lost events.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list