summaryrefslogtreecommitdiff
path: root/include/linux/ptrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ptrace.h')
-rw-r--r--include/linux/ptrace.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 9b5d2c901d06..800f113bea66 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -228,7 +228,11 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace)
child->ptrace = current->ptrace;
__ptrace_link(child, current->parent);
- sigaddset(&child->pending.signal, SIGSTOP);
+ if (child->ptrace & PT_SEIZED)
+ task_set_jobctl_pending(child, JOBCTL_TRAP_STOP);
+ else
+ sigaddset(&child->pending.signal, SIGSTOP);
+
set_tsk_thread_flag(child, TIF_SIGPENDING);
}
}