]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/ptrace.c
ptrace: introduce PTRACE_O_EXITKILL
[karo-tx-linux.git] / kernel / ptrace.c
index 1f5e55dda955544ca4a3f1f944e967f6b561bea2..ec8118ab2a47edaacda635a5eca0a104db3c09b3 100644 (file)
@@ -457,6 +457,9 @@ void exit_ptrace(struct task_struct *tracer)
                return;
 
        list_for_each_entry_safe(p, n, &tracer->ptraced, ptrace_entry) {
+               if (unlikely(p->ptrace & PT_EXITKILL))
+                       send_sig_info(SIGKILL, SEND_SIG_FORCED, p);
+
                if (__ptrace_detach(tracer, p))
                        list_add(&p->ptrace_entry, &ptrace_dead);
        }