- service processes and user processes that are shared
- between multiple sessions of the same user). For
- processes not being part of a login session this
- function will fail. The returned string needs to be
- freed with the libc
+ service processes, user processes that are shared
+ between multiple sessions of the same user, or kernel
+ threads). For processes not being part of a login
+ session this function will fail. The returned string
+ needs to be freed with the libc
+ <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ call after use.</para>
+
+ <para><function>sd_pid_get_unit()</function> may be
+ used to determine the systemd system unit (i.e. system
+ service) identifier of a process identified by the
+ specified PID. The unit name is a short string,
+ suitable for usage in file system paths. Note that not
+ all processes are part of a system unit/service
+ (e.g. user processes, or kernel threads). For
+ processes not being part of a systemd system unit this
+ function will fail. (More specifically: this call will
+ not work for processes that are part of user units,
+ use <function>sd_pid_get_user_unit()</function> for
+ that.) The returned string needs to be freed with the
+ libc