函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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 kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent)

返回类型:void

参数:

类型参数名称
struct task_struct *tsk
struct task_struct *parent
320  pgrp等于Without tasklist or RCU lock it is not safe to dereference* the result of task_pgrp/task_session even if task == current,* we can race with another thread doing sys_setsid/sys_setpgid.
321  ignored_task等于tsk
323  如果非parentparent等于真正的父进程
328  否则ignored_task = NULL
334  如果Without tasklist or RCU lock it is not safe to dereference* the result of task_pgrp/task_session even if task == current,* we can race with another thread doing sys_setsid/sys_setpgid.不等于pgrptask_session(parent)恒等于task_session(tsk)且Determine if a process group is "orphaned", according to the POSIX* definition in 2has_stopped_jobs(pgrp)则
338  __kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp)
339  __kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp)
调用者
名称描述
reparent_leaderAny that need to be release_task'd are put on the @dead list.
exit_notifySend signals to all our closest relatives so that they know* to properly mourn us..