Lines Matching defs:pidfd
47 #include <uapi/linux/pidfd.h>
602 * pidfd_get_task() - Get the task associated with a pidfd
604 * @pidfd: pidfd for which to get the task
605 * @flags: flags associated with this pidfd
607 * Return the task associated with @pidfd. The function takes a reference on
610 * Return: On success, the task_struct associated with the pidfd.
613 struct task_struct *pidfd_get_task(int pidfd, unsigned int *flags)
620 switch (pidfd) {
630 pid = pidfd_get_pid(pidfd, &f_flags);
649 * @pid: struct pid that the pidfd will reference
655 * been unshared to avoid leaking the pidfd to the new process.
659 * Return: On success, a cloexec pidfd is returned.
664 int pidfd;
667 pidfd = pidfd_prepare(pid, flags, &pidfd_file);
668 if (pidfd < 0)
669 return pidfd;
671 fd_install(pidfd, pidfd_file);
672 return pidfd;
678 * @pid: pid for which to retrieve a pidfd
685 * Return: On success, a cloexec pidfd is returned.
934 * @pidfd: the pidfd file descriptor of the process
939 * based on the pidfd, and file descriptor number. It requires that
941 * by the pidfd. The process which is having its file descriptor copied
947 SYSCALL_DEFINE3(pidfd_getfd, int, pidfd, int, fd,
956 CLASS(fd, f)(pidfd);