Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\signal.c Create Date:2022-07-28 09:16:07
Last Modify:2020-03-17 13:28:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__kill_pgrp_info() sends a signal to a process group: this is what the tty* control characters do (^C, ^Z etc)* - the caller must hold at least a readlock on tasklist_lock

Proto:int __kill_pgrp_info(int sig, struct kernel_siginfo *info, struct pid *pgrp)

Type:int

Parameter:

TypeParameterName
intsig
struct kernel_siginfo *info
struct pid *pgrp
1420  struct task_struct * p = NULL
1423  success = 0
1424  retval = -ESRCH
1425  Do
1425  If ((pgrp) != NULL) Then cycle (({
1425  cycle (({}), (p) = ({
1425  typeof(({typeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first))))________p1 = ({union{typeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first))))__val;char __c[1];}__u;if (1)__read_once_size( & (( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))), __u.__c, sizeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))));Else  __read_once_size_nocheck( & (( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))), __u.__c, sizeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))));Do{}while (0);__u.__val;});((typeof( * ( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))) * )(________p1));}))____ptr = (({
1425  typeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first))))________p1 = ({
1425  union{typeof(( * ((structhlist_node * * )( & first)))) __val;char __c[1];}__u
1425  If 1 Then __read_once_size( & (( * ((structhlist_node * * )( & first)))), __c, size of *first )
1425  Else __read_once_size_nocheck( & (( * ((structhlist_node * * )( & first)))), __c, size of *first )
1425  Do
1425  When 0 cycle
1425  __val
1425  })
1425  }))
1425  ____ptr ? ({
1425  __mptr = ____ptr
1425  Do
1425  When 0 cycle
1425  __mptr - __builtin_offsetof(typeof( * ((p))), pid_links[PIDTYPE_PGID])
1425  }) : NULL
1425  cycle (({}), (p) = ({});(p);(p) = ({
1425  typeof(({typeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next))))________p1 = ({union{typeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next))))__val;char __c[1];}__u;if (1)__read_once_size( & (( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))), __u.__c, sizeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))));Else  __read_once_size_nocheck( & (( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))), __u.__c, sizeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))));Do{}while (0);__u.__val;});((typeof( * ( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))) * )(________p1));}))____ptr = (({
1425  typeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next))))________p1 = ({
1425  union{typeof(( * ((structhlist_node * * )( & next)))) __val;char __c[1];}__u
1425  If 1 Then __read_once_size( & (( * ((structhlist_node * * )( & next)))), __c, size of *next )
1425  Else __read_once_size_nocheck( & (( * ((structhlist_node * * )( & next)))), __c, size of *next )
1425  Do
1425  When 0 cycle
1425  __val
1425  })
1425  }))
1425  ____ptr ? ({
1425  __mptr = ____ptr
1425  Do
1425  When 0 cycle
1425  __mptr - __builtin_offsetof(typeof( * ((p))), pid_links[PIDTYPE_PGID])
1425  }) : NULL
1425  }))
1427  success |= Not err
1428  retval = err
1429  If PIDTYPE_PGID == PIDTYPE_PID Then Break
1429  When 0 cycle
1430  Return If success Then 0 Else retval
Caller
NameDescribe
kill_orphaned_pgrpCheck to see if any process groups have become orphaned as* a result of our exiting, and if they have any stopped jobs,* send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
kill_something_infokill_something_info() interprets pid in interesting ways just like kill(2).* POSIX specifies that kill(-1,sig) is unspecified, but what we have* is probably wrong. Should make it like BSD or SYSV.
kill_pgrp