Lines Matching refs:father
453 static struct task_struct *find_child_reaper(struct task_struct *father) in find_child_reaper() argument
457 struct pid_namespace *pid_ns = task_active_pid_ns(father); in find_child_reaper()
460 if (likely(reaper != father)) in find_child_reaper()
463 reaper = find_alive_thread(father); in find_child_reaper()
472 father->signal->group_exit_code ?: father->exit_code); in find_child_reaper()
477 return father; in find_child_reaper()
487 static struct task_struct *find_new_reaper(struct task_struct *father, in find_new_reaper() argument
492 thread = find_alive_thread(father); in find_new_reaper()
496 if (father->signal->has_child_subreaper) { in find_new_reaper()
502 for (reaper = father; in find_new_reaper()
522 static void reparent_leader(struct task_struct *father, struct task_struct *p, in reparent_leader() argument
540 kill_orphaned_pgrp(p, father); in reparent_leader()
551 static void forget_original_parent(struct task_struct *father, in forget_original_parent() argument
556 if (unlikely(!list_empty(&father->ptraced))) in forget_original_parent()
557 exit_ptrace(father, dead); in forget_original_parent()
560 reaper = find_child_reaper(father); in forget_original_parent()
561 if (list_empty(&father->children)) in forget_original_parent()
564 reaper = find_new_reaper(father, reaper); in forget_original_parent()
565 list_for_each_entry(p, &father->children, sibling) { in forget_original_parent()
568 BUG_ON((!t->ptrace) != (t->parent == father)); in forget_original_parent()
579 if (!same_thread_group(reaper, father)) in forget_original_parent()
580 reparent_leader(father, p, dead); in forget_original_parent()
582 list_splice_tail_init(&father->children, &reaper->children); in forget_original_parent()