Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\sched\signal.h Create Date:2022-07-28 05:40:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:static inline struct pid *task_pgrp(struct task_struct *task)

Type:struct pid

Parameter:

TypeParameterName
struct task_struct *task
616  Return pids[PIDTYPE_PGID]
Caller
NameDescribe
copy_processCreate a new process
will_become_orphaned_pgrpDetermine if a process group is "orphaned", according to the POSIX* definition in 2
is_current_pgrp_orphaned
kill_orphaned_pgrpCheck 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)
kill_something_infokill_something_info() interprets pid in interesting ways just like kill(2).* POSIX specifies that kill(-1,sig) is unspecified, but what we have* is probably wrong. Should make it like BSD or SYSV.
SYSCALL_DEFINE3
SYSCALL_DEFINE2Ugh. To avoid negative return values, "getpriority()" will* not return the normal nice-value, but a negated value that* has been offset by 20 (ie it returns 40..1 instead of -20..19)* to stay compatible.
SYSCALL_DEFINE2This needs some heavy checking
do_getpgid
set_special_pids
SYSCALL_DEFINE3
SYSCALL_DEFINE2