Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:When we die, we re-parent all our children, and try to:* 1

Proto:static struct task_struct *find_new_reaper(struct task_struct *father, struct task_struct *child_reaper)

Type:struct task_struct

Parameter:

TypeParameterName
struct task_struct *father
struct task_struct *child_reaper
544  thread = find_alive_thread(father)
545  If thread Then Return thread
548  If has_child_subreaper Then
549  ns_level = level
558  When level == ns_level cycle
561  If reaper == init_task Then Break
563  If Not is_child_subreaper Then Continue
566  If thread Then Return thread
571  Return child_reaper
Caller
NameDescribe
forget_original_parentThis 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)