chiark / gitweb /
login: add an api to determine the slice a PID is located in to libsystemd-login
[elogind.git] / src / login / sd-login.c
index 875d134efcc0aa70befd417ed7476f1ab6c6c6e6..06587921cd2864ca7fc59a9ad9c835d34a7bc276 100644 (file)
@@ -72,6 +72,16 @@ _public_ int sd_pid_get_machine_name(pid_t pid, char **name) {
         return cg_pid_get_machine_name(pid, name);
 }
 
+_public_ int sd_pid_get_slice(pid_t pid, char **slice) {
+
+        if (pid < 0)
+                return -EINVAL;
+        if (!slice)
+                return -EINVAL;
+
+        return cg_pid_get_slice(pid, slice);
+}
+
 _public_ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid) {
 
         if (pid < 0)