Function Report

Linux Kernel (v4.4)

Source File:include\linux\sched.h Create Date:2016-01-14 09:13:26
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:task_pgrp

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

Return Type:static inline struct pid *

Parameter:

Type Parameter NameRemarks
struct task_struct * task

Function description: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.

1887  Returning pid
Caller
Function NameFunction description
copy_processCreate a new process
will_become_orphaned_pgrpDetermine if a process group is"orphaned", according to the POSIX definition in 2.2.2.52. Orphaned process groups are not to be affected by terminal-generated stop signals. Newly orphaned process groups are to receive a SIGHUP and a SIGCONT.
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_infointerprets pid in interesting ways just like kill(2).
SYSC_setpriority
SYSC_getpriority
SYSC_setpgid
SYSC_getpgid
set_special_pids
SYSC_ioprio_set
SYSC_ioprio_get