/* * unptrace a task: move it back to its original parent and * remove it from the ptrace list. * * Must be called with the tasklist lock write-held. */ void __ptrace_unlink(struct task_struct *child) { BUG_ON(!child->ptrace); child->ptrace = 0; child->parent = child->real_parent; list_del_init(&child->ptrace_entry); if (task_is_traced(child)) ptrace_untrace(child); }
/* * unptrace a task: move it back to its original parent and * remove it from the ptrace list. * * Must be called with the tasklist lock write-held. */ void __ptrace_unlink(struct task_struct *child) { BUG_ON(!child->ptrace); child->ptrace = 0; if (!list_empty(&child->ptrace_list)) { list_del_init(&child->ptrace_list); remove_parent(child); child->parent = child->real_parent; add_parent(child); } if (child->state == TASK_TRACED) ptrace_untrace(child); }
/* * unptrace a task: move it back to its original parent and * remove it from the ptrace list. * * Must be called with the tasklist lock write-held. */ void __ptrace_unlink(task_t *child) { if (!child->ptrace) BUG(); child->ptrace = 0; if (!list_empty(&child->ptrace_list)) { list_del_init(&child->ptrace_list); REMOVE_LINKS(child); child->parent = child->real_parent; SET_LINKS(child); } if (child->state == TASK_TRACED) ptrace_untrace(child); }