summaryrefslogtreecommitdiffstats
path: root/include/libcgroup.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libcgroup.h')
-rw-r--r--include/libcgroup.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/libcgroup.h b/include/libcgroup.h
index 085c17a..4da55e4 100644
--- a/include/libcgroup.h
+++ b/include/libcgroup.h
@@ -285,6 +285,32 @@ int cgroup_get_task_begin(char *cgroup, char *controller, void **handle,
pid_t *pid);
/**
+ * Get process data (euid, egid, and process name) from /proc/<pid>status
+ * file.
+ * @param pid: The process id
+ * @param euid: If this is NULL, the euid is not taken
+ * @param egid: If this is NULL, the egid is not taken
+ * @param procname: If this is NULL, the process name is not taken
+ * @param size_procname: The buffer size of procname
+ * @return 0 on success, > 0 on error.
+ */
+int cgroup_get_procdata_from_status(pid_t pid, uid_t *euid, gid_t *egid,
+ char *procname, size_t size_procname);
+
+/**
+ * Get process data (euid, egid, and process name) from /proc/<pid>status
+ * file.
+ * @param pid: The process id
+ * @param euid: If this is NULL, the euid is not taken
+ * @param egid: If this is NULL, the egid is not taken
+ * @param procname: If this is NULL, the process name is not taken
+ * @param size_procname: The buffer size of procname
+ * @return 0 on success, > 0 on error.
+ */
+int cgroup_get_procdata_from_status(pid_t pid, uid_t *euid, gid_t *egid,
+ char *procname, size_t size_procname);
+
+/**
* Read the next task value
* @handle: The handle used for iterating
* @pid: The variable where the value will be stored