Function report |
Source Code:kernel\signal.c |
Create Date:2022-07-28 09:15:39 |
| Last Modify:2020-03-17 13:28:47 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__send_signal
Proto:static int __send_signal(int sig, struct kernel_siginfo *info, struct task_struct *t, enum pid_type type, bool force)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| int | sig | |
| struct kernel_siginfo * | info | |
| struct task_struct * | t | |
| enum pid_type | type | |
| bool | force |
| 1071 | ret = 0 |
| 1073 | assert_spin_locked( & siglock) |
| 1075 | result = TRACE_SIGNAL_IGNORED |
| 1076 | If Not Handle magic process-wide effects of stop/continue signals Then Go to ret |
| 1079 | pending = If type != PIDTYPE_PID Then shared_pending Else pending |
| 1086 | If legacy_queue(pending, sig) Then Go to ret |
| 1089 | result = TRACE_SIGNAL_DELIVERED |
| 1093 | If sig == SIGKILL || Per task flags (PF_*), defined further below: & I am a kernel thread Then Go to out_set |
| 1105 | If sig < These should not be considered constants from userland. Then override_rlimit = is_si_special(info) || si_code >= 0 |
| 1107 | Else override_rlimit = 0 |
| 1110 | q = allocate a new signal queue record* - this may be called without locks if and only if t == current, otherwise an* appropriate lock must be held to stop the target task from exiting |
| 1111 | If q Then |
| 1115 | clear_siginfo( & info) |
| 1117 | si_errno = 0 |
| 1119 | si_pid = task_tgid_nr_ns(current process, task_active_pid_ns(t)) |
| 1122 | si_uid = from_kuid_munged(task_cred_xxx(t, user_ns), current_uid()) |
| 1126 | Break |
| 1127 | Case info == SEND_SIG_PRIV |
| 1135 | Default |
| 1136 | copy_siginfo( & info, info) |
| 1137 | Break |
| 1139 | Else if Not is_si_special(info) && sig >= These should not be considered constants from userland. && si_code != sent by kill, sigsend, raise Then |
| 1149 | Else |
| 1154 | result = TRACE_SIGNAL_LOSE_INFO |
| 1157 | out_set : |
| 1162 | If type > PIDTYPE_TGID Then |
| 1167 | If sig == SIGCONT Then sigdelsetmask(signal, SIG_KERNEL_STOP_MASK) |
| 1169 | Else if sig_kernel_stop(sig) Then sigdelset(signal, SIGCONT) |
| 1175 | complete_signal(sig, t, type) |
| 1176 | ret : |
| 1178 | Return ret |
| Name | Describe |
|---|---|
| send_signal | |
| kill_pid_usb_asyncio | The usb asyncio usage of siginfo is wrong |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |