Function report |
Source Code:fs\exec.c |
Create Date:2022-07-28 20:03:59 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This function makes sure the current process has its own signal table,* so that flush_signal_handlers can later reset the handlers without* disturbing other processes. (Other processes might share the signal* table via the CLONE_SIGHAND option to clone().)
Proto:static int de_thread(struct task_struct *tsk)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct task_struct * | tsk |
1063 | oldsighand = sighand |
1066 | If thread_group_empty(tsk) Then Go to no_thread_group |
1072 | spin_lock_irq(lock) |
1078 | spin_unlock_irq(lock) |
1079 | Return -EAGAIN |
1082 | group_exit_task = tsk |
1089 | spin_unlock_irq(lock) |
1090 | schedule() |
1091 | If __fatal_signal_pending(tsk) Then Go to killed |
1093 | spin_lock_irq(lock) |
1095 | spin_unlock_irq(lock) |
1102 | If Not thread_group_leader(tsk) Then |
1103 | leader = group_leader |
1105 | cycle |
1107 | write_lock_irq( & tasklist_lock) |
1113 | If Value is more likely to compile time(exit_state) Then Break |
1116 | write_unlock_irq( & tasklist_lock) |
1118 | schedule() |
1119 | If __fatal_signal_pending(tsk) Then Go to killed |
1133 | start_time = start_time |
1134 | start_boottime = start_boottime |
1136 | BUG_ON(!same_thread_group(leader, tsk)) |
1137 | BUG_ON(Do to the insanities of de_thread it is possible for a process* to have the pid of the thread group leader without actually being* the thread group leader) |
1151 | change_pid(tsk, PIDTYPE_PID, task_pid(leader)) |
1157 | list_replace_init( & sibling, & sibling) |
1159 | group_leader = tsk |
1160 | group_leader = tsk |
1162 | exit_signal = SIGCHLD |
1163 | exit_signal = -1 |
1165 | BUG_ON(exit_state != EXIT_ZOMBIE) |
1173 | If Value for the false possibility is greater at compile time(ptrace) Then __wake_up_parent(leader, parent) |
1175 | write_unlock_irq( & tasklist_lock) |
1178 | release_task(leader) |
1181 | group_exit_task = NULL |
1184 | no_thread_group : |
1186 | exit_signal = SIGCHLD |
1199 | newsighand = kmem_cache_alloc(SLAB cache for sighand_struct structures (tsk->sighand) , GFP_KERNEL) |
1200 | If Not newsighand Then Return -ENOMEM |
1207 | write_lock_irq( & tasklist_lock) |
1210 | spin_unlock( & siglock) |
1211 | write_unlock_irq( & tasklist_lock) |
1213 | __cleanup_sighand(oldsighand) |
1216 | BUG_ON(!thread_group_leader(tsk)) |
1217 | Return 0 |
1219 | killed : |
1221 | read_lock( & tasklist_lock) |
1222 | group_exit_task = NULL |
1224 | read_unlock( & tasklist_lock) |
1225 | Return -EAGAIN |
Name | Describe |
---|---|
flush_old_exec | Calling this is the point of no return. None of the failures will be* seen by userspace since either the process is already taking a fatal* signal (via de_thread() or coredump), or will have SEGV raised |
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 |