Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\exit.c Create Date:2022-07-28 09:03:14
Last Modify:2020-03-17 11:17:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Send signals to all our closest relatives so that they know* to properly mourn us..

Proto:static void exit_notify(struct task_struct *tsk, int group_dead)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
intgroup_dead
649  LIST_HEAD(dead)
651  write_lock_irq( & tasklist_lock)
652  This does two things:* A. Make init inherit all the child processes* B. Check 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)
654  If group_dead Then Check 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)
657  exit state = EXIT_ZOMBIE
658  If Value for the false possibility is greater at compile time(ptrace) Then
659  sig = If thread_group_leader(tsk) && thread_group_empty(tsk) && Not ptrace_reparented(tsk) Then exit signal Else SIGCHLD
663  autoreap = do_notify_parent(tsk, sig)
664  Else if thread_group_leader(tsk) Then
665  autoreap = thread_group_empty(tsk) && do_notify_parent(tsk, exit signal)
667  Else
668  autoreap = true
671  If autoreap Then
672  exit state = Used in tsk->exit_state:
673  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
677  If Value for the false possibility is greater at compile time(notify_count < 0) Then wake_up_process(group_exit_task)
679  write_unlock_irq( & tasklist_lock)
682  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
683  release_task(p)
Caller
NameDescribe
do_exit