process-util: add helper pidfd_get_pid()

It returns the pid_t a pidfd refers to.
This commit is contained in:
Lennart Poettering
2019-12-04 10:34:26 +01:00
parent 5ead4e85f6
commit 298f466f15
2 changed files with 35 additions and 0 deletions
+2
View File
@@ -197,3 +197,5 @@ assert_cc(TASKS_MAX <= (unsigned long) PID_T_MAX);
(pid) = 0; \
_pid_; \
})
int pidfd_get_pid(int fd, pid_t *ret);