Lines Matching defs:pidfd
18 #include "../../pidfd/pidfd.h"
96 /* borrowed (with all helpers) from pidfd/pidfd_open_test.c */
97 static pid_t get_pid_from_fdinfo_file(int pidfd, const char *key, size_t keylen)
106 snprintf(path, sizeof(path), "/proc/self/fdinfo/%d", pidfd);
134 int *pidfd;
150 if (cmsg->cmsg_len < sizeof(*res->pidfd)) {
155 res->pidfd = (void *)CMSG_DATA(cmsg);
169 if (!res->pidfd) {
223 /* pidfd from SCM_PIDFD should point to the parent process PID */
225 get_pid_from_fdinfo_file(*res.pidfd, "Pid:", sizeof("Pid:") - 1);
228 close(*res.pidfd);
232 close(*res.pidfd);
280 * pidfd from SCM_PIDFD should point to the client_pid.
284 if (ioctl(*res.pidfd, PIDFD_GET_INFO, &info)) {
286 close(*res.pidfd);
292 close(*res.pidfd);
299 close(*res.pidfd);
303 close(*res.pidfd);