Lines Matching refs:pidfd
34 static pid_t pidfd_clone(int flags, int *pidfd) in pidfd_clone() argument
40 return __clone2(do_child, stack, stack_size, flags | SIGCHLD, NULL, pidfd); in pidfd_clone()
42 return clone(do_child, stack + stack_size, flags | SIGCHLD, NULL, pidfd); in pidfd_clone()
46 static inline int sys_pidfd_send_signal(int pidfd, int sig, siginfo_t *info, in sys_pidfd_send_signal() argument
49 return syscall(__NR_pidfd_send_signal, pidfd, sig, info, flags); in sys_pidfd_send_signal()
52 static int pidfd_metadata_fd(pid_t pid, int pidfd) in pidfd_metadata_fd() argument
68 ret = sys_pidfd_send_signal(pidfd, 0, NULL, 0); in pidfd_metadata_fd()
86 int pidfd = -1, ret = EXIT_FAILURE; in main() local
92 pid = pidfd_clone(CLONE_PIDFD, &pidfd); in main()
95 if (pidfd == -1) { in main()
100 procfd = pidfd_metadata_fd(pid, pidfd); in main()
101 close(pidfd); in main()