From 60211b35070a20ed0e78a83f39619139d56f7745 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Jul 2013 18:10:12 +0200 Subject: [PATCH 1/1] man: document sd_pid_get_slice() call of libsystemd-login --- Makefile-man.am | 5 +++++ TODO | 2 +- man/sd_pid_get_session.xml | 42 ++++++++++++++++++++++++++++---------- 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/Makefile-man.am b/Makefile-man.am index e74cceaad..a8d418fda 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -828,6 +828,7 @@ MANPAGES_ALIAS += \ man/sd_login_monitor_unref.3 \ man/sd_pid_get_machine_name.3 \ man/sd_pid_get_owner_uid.3 \ + man/sd_pid_get_slice.3 \ man/sd_pid_get_unit.3 \ man/sd_pid_get_user_unit.3 \ man/sd_seat_can_multi_session.3 \ @@ -855,6 +856,7 @@ man/sd_login_monitor_get_timeout.3: man/sd_login_monitor_new.3 man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3 man/sd_pid_get_machine_name.3: man/sd_pid_get_session.3 man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3 +man/sd_pid_get_slice.3: man/sd_pid_get_session.3 man/sd_pid_get_unit.3: man/sd_pid_get_session.3 man/sd_pid_get_user_unit.3: man/sd_pid_get_session.3 man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3 @@ -904,6 +906,9 @@ man/sd_pid_get_machine_name.html: man/sd_pid_get_session.html man/sd_pid_get_owner_uid.html: man/sd_pid_get_session.html $(html-alias) +man/sd_pid_get_slice.html: man/sd_pid_get_session.html + $(html-alias) + man/sd_pid_get_unit.html: man/sd_pid_get_session.html $(html-alias) diff --git a/TODO b/TODO index 63b1280f0..d1d7140c8 100644 --- a/TODO +++ b/TODO @@ -46,7 +46,7 @@ CGroup Rework Completion: * introduce high-level settings for RT budget, swappiness * wiki: document new bus APIs of PID 1 (transient units, Reloading signal) -* review: scope units, slice units, pid1, machinectl, libsystem-login, pam_system, systemctl commands +* review: scope units, slice units, pid1, pam_system, systemctl commands * Send SIGHUP and SIGTERM in session scopes diff --git a/man/sd_pid_get_session.xml b/man/sd_pid_get_session.xml index fd1ce4b87..ecd22f7bf 100644 --- a/man/sd_pid_get_session.xml +++ b/man/sd_pid_get_session.xml @@ -48,7 +48,10 @@ sd_pid_get_user_unit sd_pid_get_owner_uid sd_pid_get_machine_name - Determine session, service, owner of a session or container/VM of a specific PID + sd_pid_get_slice + Determine session, service, owner of a + session, container/VM or slice of a specific + PID @@ -84,6 +87,12 @@ pid_t pid char** name + + + int sd_pid_get_slice + pid_t pid + char** slice + @@ -138,11 +147,20 @@ and not being a shared process of a user this function will fail. - sd_pid_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 + 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. + + sd_pid_get_slice() may be + used to determine the slice unit the process is a + member of. See + systemd.slice5 + for details about slices. The returned string needs to + be freed with the libc free3 call after use. @@ -165,10 +183,11 @@ The sd_pid_get_session(), sd_pid_get_unit(), sd_pid_get_user_unit(), - sd_pid_get_owner_uid() and - sd_pid_get_machine_name() - interfaces are available as shared library, which can - be compiled and linked to with the + sd_pid_get_owner_uid(), + sd_pid_get_machine_name() and + sd_pid_get_slice() interfaces are + available as shared library, which can be compiled and + linked to with the libsystemd-login pkg-config1 file. @@ -186,7 +205,8 @@ systemd1, sd-login3, sd_session_is_active3, - getsid2 + getsid2, + systemd.slice5 -- 2.30.2