- <para><function>sd_pid_get_unit()</function> may be used to
- determine the systemd system unit (i.e. system service or scope
- unit) 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 with -ENODATA. (More specifically, this call will not
- work for kernel threads.) The returned string needs to be freed
- with the libc <citerefentry
- project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
- call after use.</para>
-
- <para><function>sd_pid_get_user_unit()</function> may be used to
- determine the systemd user unit (i.e. user service or scope unit)
- identifier of a process identified by the specified PID. This is
- similar to <function>sd_pid_get_unit()</function>, but applies to
- user units instead of system units.</para>
-