Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\pid.c Create Date:2022-07-28 09:28:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:pidfd_open() - Open new pid file descriptor.*@pid: pid for which to retrieve a pidfd*@flags: flags to pass* This creates a new pid file descriptor with the O_CLOEXEC flag set for* the process identified by @pid. Currently, the process identified by

Proto:SYSCALL_DEFINE2(pidfd_open, pid_t, pid, unsigned int, flags)

Type:

Parameter:Nothing

545  If flags Then Return -EINVAL
548  If (pid <= 0) Then Return -EINVAL
551  p = find_get_pid(pid)
552  If Not p Then Return -ESRCH
555  If pid_has_task(p, PIDTYPE_TGID) Then fd = pidfd_create() - Create a new pid file descriptor.*@pid: struct pid that the pidfd will reference* This creates a new pid file descriptor with the O_CLOEXEC flag set.* Note, that this function can only be called after the fd table has
557  Else fd = -EINVAL
560  put_pid(p)
561  Return fd