函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\exit.c Create Date:2022-07-27 10:02:54
Last Modify:2020-03-17 11:17:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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)

函数原型:static void forget_original_parent(struct task_struct *father, struct list_head *dead)

返回类型:void

参数:

类型参数名称
struct task_struct *father
struct list_head *dead
611  如果此条件成立可能性小(为编译器优化)(!链表为空)则exit_ptrace(father, dead)
615  reaper等于find_child_reaper(father, dead)
616  如果链表为空则返回
619  reaper等于When we die, we re-parent all our children, and try to:* 1
621  for_each_thread(p, t)
622  真正的父进程等于reaper
623  BUG_ON((!ptrace) != ( Recipient of SIGCHLD, wait4() reports: == father))
624  如果此条件成立可能性大(为编译器优化)(!ptrace)则 Recipient of SIGCHLD, wait4() reports: 等于真正的父进程
626  如果父进程终止时发出的信号group_send_sig_info(父进程终止时发出的信号, These can be the second arg to send_sig_info/send_group_sig_info. , t, PIDTYPE_TGID)
635  如果非same_thread_group(reaper, father)则Any that need to be release_task'd are put on the @dead list.
638  加入二个链表项并重新初始化
调用者
名称描述
exit_notifySend signals to all our closest relatives so that they know* to properly mourn us..