Lines Matching refs:pidfd
47 #include <uapi/linux/pidfd.h>
557 * pidfd_get_task() - Get the task associated with a pidfd
559 * @pidfd: pidfd for which to get the task
560 * @flags: flags associated with this pidfd
562 * Return the task associated with @pidfd. The function takes a reference on
565 * Return: On success, the task_struct associated with the pidfd.
568 struct task_struct *pidfd_get_task(int pidfd, unsigned int *flags)
574 pid = pidfd_get_pid(pidfd, &f_flags);
590 * @pid: struct pid that the pidfd will reference
596 * been unshared to avoid leaking the pidfd to the new process.
600 * Return: On success, a cloexec pidfd is returned.
605 int pidfd;
608 pidfd = pidfd_prepare(pid, flags, &pidfd_file);
609 if (pidfd < 0)
610 return pidfd;
612 fd_install(pidfd, pidfd_file);
613 return pidfd;
619 * @pid: pid for which to retrieve a pidfd
626 * Return: On success, a cloexec pidfd is returned.
733 * @pidfd: the pidfd file descriptor of the process
738 * based on the pidfd, and file descriptor number. It requires that
740 * by the pidfd. The process which is having its file descriptor copied
746 SYSCALL_DEFINE3(pidfd_getfd, int, pidfd, int, fd,
757 f = fdget(pidfd);