Function report

linux kernel

5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\signal.c Create Date:2020-09-18 20:21:21
Last Modify:2020-03-17 13:28:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload PLEAChinese

Name:sys_pidfd_send_signal - Signal a process through a pidfd

Proto:SYSCALL_DEFINE4(pidfd_send_signal, int, pidfd, int, sig, siginfo_t *, info, unsigned int, flags)

Type:

Parameter:

TypeParameterName
unsignedint
3713  pid * pid
3717  If flags Then Return -Invalid argument
3720  f = fdget(pidfd)
3721  If Not file Then Return -Bad file number
3725  pid = pidfd_to_pid(file)
3726  If IS_ERR(pid) Then
3727  ret = PTR_ERR(pid)
3728  Go to err
3731  ret = -Invalid argument
3732  If Not Verify that the signaler and signalee either are in the same pid namespace * or that the signaler's pid namespace is an ancestor of the signalee's pid * namespace. Then Go to err
3735  If info Then
3736  ret = copy_siginfo_from_user_any( & kinfo, info)
3737  If Value for the false possibility is greater at compile time(ret) Then Go to err
3740  ret = -Invalid argument
3741  If Value for the false possibility is greater at compile time(sig != si_signo) Then Go to err
3745  ret = -Operation not permitted
3746  If task_pid(current process) != pid && ( si_code >= 0 || si_code == sent by tkill system call ) Then Go to err
3749  Else
3750  prepare_kill_siginfo(sig, & kinfo)
3753  ret = kill_pid_info(sig, & kinfo, pid)
3755err:
3756  fdput(f)
3757  Return ret