return cg_pid_get_session(pid, session);
}
_public_ int sd_pid_get_unit(pid_t pid, char **unit) {
return cg_pid_get_session(pid, session);
}
_public_ int sd_pid_get_unit(pid_t pid, char **unit) {
return cg_pid_get_unit(pid, unit);
}
_public_ int sd_pid_get_user_unit(pid_t pid, char **unit) {
return cg_pid_get_unit(pid, unit);
}
_public_ int sd_pid_get_user_unit(pid_t pid, char **unit) {
return cg_pid_get_user_unit(pid, unit);
}
_public_ int sd_pid_get_machine_name(pid_t pid, char **name) {
return cg_pid_get_user_unit(pid, unit);
}
_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) {
return cg_pid_get_machine_name(pid, name);
}
_public_ int sd_pid_get_slice(pid_t pid, char **slice) {
return cg_pid_get_slice(pid, slice);
}
_public_ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid) {
return cg_pid_get_slice(pid, slice);
}
_public_ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid) {
r = sd_pid_get_session(0, &buf);
if (r < 0)
return r;
p = strappend("/run/systemd/sessions/", buf);
r = sd_pid_get_session(0, &buf);
if (r < 0)
return r;
p = strappend("/run/systemd/sessions/", buf);
return r;
r = parse_env_file(p, NEWLINE, "ACTIVE", &s, NULL);
return r;
r = parse_env_file(p, NEWLINE, "ACTIVE", &s, NULL);
/* For now we will only return POLLIN here, since we don't
* need anything else ever for inotify. However, let's have
/* For now we will only return POLLIN here, since we don't
* need anything else ever for inotify. However, let's have
/* For now we will only return (uint64_t) -1, since we don't
* need any timeout. However, let's have this API to keep our
/* For now we will only return (uint64_t) -1, since we don't
* need any timeout. However, let's have this API to keep our