Function Report

Linux Kernel (v4.4)

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

Function Name:ptrace_init_task

Function:static inline void ptrace_init_task(struct task_struct *child, bool ptrace)

Return Type:static inline void


Type Parameter NameRemarks
struct task_struct * child new child task
bool ptrace true if child should be ptrace'd by parent's tracer

Function description: initialize ptrace state for a new child

176  Initialization list head
177  Initialization list head
178  siglock protected = 0
179  ptrace = 0
180  recipient of SIGCHLD, wait4() reports = real parent process
182  If Value for the false possibility is greater at compile time && current process->ptrace then
183  ptrace = current process->ptrace
184  ptrace a task: make the debugger its new parent and move it to the ptrace list.
186  If ptrace & SEIZE used, enable new behavior then set jobctl pending bits
188  Else ( &signal, SIGSTOP)
191  set thread flags in other task's structures- see asm/thread_info.h for TIF_xxxx flags available
Function NameFunction description
copy_processCreate a new process