aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/ptrace.c7
-rw-r--r--kernel/signal.c6
2 files changed, 8 insertions, 5 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 019e04ec065a..863eee8bff47 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -56,6 +56,10 @@ void ptrace_untrace(task_t *child)
56 signal_wake_up(child, 1); 56 signal_wake_up(child, 1);
57 } 57 }
58 } 58 }
59 if (child->signal->flags & SIGNAL_GROUP_EXIT) {
60 sigaddset(&child->pending.signal, SIGKILL);
61 signal_wake_up(child, 1);
62 }
59 spin_unlock(&child->sighand->siglock); 63 spin_unlock(&child->sighand->siglock);
60} 64}
61 65
@@ -77,8 +81,7 @@ void __ptrace_unlink(task_t *child)
77 SET_LINKS(child); 81 SET_LINKS(child);
78 } 82 }
79 83
80 if (child->state == TASK_TRACED) 84 ptrace_untrace(child);
81 ptrace_untrace(child);
82} 85}
83 86
84/* 87/*
diff --git a/kernel/signal.c b/kernel/signal.c
index 1d905ec74bde..9d1512dcf176 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1108,8 +1108,8 @@ void zap_other_threads(struct task_struct *p)
1108 if (t != p->group_leader) 1108 if (t != p->group_leader)
1109 t->exit_signal = -1; 1109 t->exit_signal = -1;
1110 1110
1111 /* SIGKILL will be handled before any pending SIGSTOP */
1111 sigaddset(&t->pending.signal, SIGKILL); 1112 sigaddset(&t->pending.signal, SIGKILL);
1112 rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending);
1113 signal_wake_up(t, 1); 1113 signal_wake_up(t, 1);
1114 } 1114 }
1115} 1115}
@@ -1879,9 +1879,9 @@ relock:
1879 /* Let the debugger run. */ 1879 /* Let the debugger run. */
1880 ptrace_stop(signr, signr, info); 1880 ptrace_stop(signr, signr, info);
1881 1881
1882 /* We're back. Did the debugger cancel the sig? */ 1882 /* We're back. Did the debugger cancel the sig or group_exit? */
1883 signr = current->exit_code; 1883 signr = current->exit_code;
1884 if (signr == 0) 1884 if (signr == 0 || current->signal->flags & SIGNAL_GROUP_EXIT)
1885 continue; 1885 continue;
1886 1886
1887 current->exit_code = 0; 1887 current->exit_code = 0;