Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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)

Proto:static void kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent)

Type:void

Parameter:

TypeParameterName
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  If Not parent Then parent = Real parent process:
328  Else ignored_task = NULL
334  If 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. != pgrp && task_session(parent) == task_session(tsk) && Determine if a process group is "orphaned", according to the POSIX* definition in 2 && has_stopped_jobs(pgrp) Then
338  __kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp)
339  __kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp)
Caller
NameDescribe
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..