X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=man%2Fsd_pid_get_session.xml;h=fac072a4c00c54f267d6a7d1f5fb0bee57984c85;hb=9d71c4569fbf7068a3a7d7b2a4cf8f05fe5eb067;hp=f708d0d5e1b9d8b5b9089fd6928b39da7dd7beb0;hpb=b952404b9386ed0ef806a830d184f696b2432e77;p=elogind.git
diff --git a/man/sd_pid_get_session.xml b/man/sd_pid_get_session.xml
index f708d0d5e..fac072a4c 100644
--- a/man/sd_pid_get_session.xml
+++ b/man/sd_pid_get_session.xml
@@ -148,9 +148,10 @@
not all processes are part of a login session (e.g. system 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
- free3
+ being part of a login session this function will fail with
+ -ENXIO. The returned string needs to be freed with the libc
+ free3
call after use.
sd_pid_get_unit() may be used to
@@ -159,11 +160,12 @@
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 sd_pid_get_user_unit() for that.) The
- returned string needs to be freed with the libc
- free3
+ systemd system unit this function will fail with -ENXIO (More
+ specifically: this call will not work for processes that are part
+ of user units, use sd_pid_get_user_unit() for
+ that.) The returned string needs to be freed with the libc
+ free3
call after use.
sd_pid_get_user_unit() may be used to
@@ -179,14 +181,16 @@
login sessions of the same user, where
sd_pid_get_session() will fail. For processes
not being part of a login session and not being a shared process
- of a user this function will fail.
+ of a user this function will fail with -ENXIO.
sd_pid_get_machine_name() may be used
to determine the name of the VM or container is a member of. The
machine name is a short string, suitable for usage in file system
paths. The returned string needs to be freed with the libc
- free3
- call after use.
+ free3
+ call after use. For processes not part of a VM or containers this
+ function fails with -ENXIO.
sd_pid_get_slice() may be used to
determine the slice unit the process is a member of. See
@@ -218,6 +222,37 @@
code.
+
+ Errors
+
+ Returned errors may indicate the following problems:
+
+
+
+
+ -ENXIO
+
+ Given field is not specified for the described
+ process or peer.
+
+
+
+
+ -ESRCH
+
+ The specified PID does not refer to a running
+ process.
+
+
+
+
+ -ENOMEM
+
+ Memory allocation failed.
+
+
+
+
Notes
@@ -235,7 +270,7 @@
sd_peer_get_slice() interfaces are
available as a shared library, which can be compiled
and linked to with the
- libsystemd pkg-config1
+ libelogind pkg-config1
file.
Note that the login session identifier as