Lines Matching refs:ptrace
669 if (!p->ptrace && in reparent_leader()
705 BUG_ON((!t->ptrace) != (rcu_access_pointer(t->parent) == father)); in forget_original_parent()
706 if (likely(!t->ptrace)) in forget_original_parent()
740 if (unlikely(tsk->ptrace)) { in exit_notify()
1064 eligible_child(struct wait_opts *wo, bool ptrace, struct task_struct *p) in eligible_child() argument
1073 if (ptrace || (wo->wo_flags & __WALL)) in eligible_child()
1226 static int *task_stopped_code(struct task_struct *p, bool ptrace) in task_stopped_code() argument
1228 if (ptrace) { in task_stopped_code()
1257 int ptrace, struct task_struct *p) in wait_task_stopped() argument
1267 if (!ptrace && !(wo->wo_flags & WUNTRACED)) in wait_task_stopped()
1270 if (!task_stopped_code(p, ptrace)) in wait_task_stopped()
1276 p_code = task_stopped_code(p, ptrace); in wait_task_stopped()
1302 why = ptrace ? CLD_TRAPPED : CLD_STOPPED; in wait_task_stopped()
1380 static int wait_consider_task(struct wait_opts *wo, int ptrace, in wait_consider_task() argument
1394 ret = eligible_child(wo, ptrace, p); in wait_consider_task()
1403 if (likely(!ptrace)) in wait_consider_task()
1408 if (likely(!ptrace) && unlikely(p->ptrace)) { in wait_consider_task()
1421 ptrace = 1; in wait_consider_task()
1433 if (unlikely(ptrace) || likely(!p->ptrace)) in wait_consider_task()
1457 if (likely(!ptrace) || (wo->wo_flags & (WCONTINUED | WEXITED))) in wait_consider_task()
1471 ret = wait_task_stopped(wo, ptrace, p); in wait_consider_task()
1542 static bool is_effectively_child(struct wait_opts *wo, bool ptrace, in is_effectively_child() argument
1546 !ptrace ? target->real_parent : target->parent; in is_effectively_child()
1558 bool ptrace; in do_wait_pid() local
1562 ptrace = false; in do_wait_pid()
1564 if (target && is_effectively_child(wo, ptrace, target)) { in do_wait_pid()
1565 retval = wait_consider_task(wo, ptrace, target); in do_wait_pid()
1570 ptrace = true; in do_wait_pid()
1572 if (target && target->ptrace && in do_wait_pid()
1573 is_effectively_child(wo, ptrace, target)) { in do_wait_pid()
1574 retval = wait_consider_task(wo, ptrace, target); in do_wait_pid()