Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11844
b: refs/heads/master
c: 30e0fca
h: refs/heads/master
v: v3
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Oct 31, 2005
1 parent d6ebb6c commit ab118c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68860ec10bcc07ab4f89f9d940e3b77ae5ca13b3
refs/heads/master: 30e0fca6c1d7d26f3f2daa4dd2b12c51dadc778a
7 changes: 5 additions & 2 deletions trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ void ptrace_untrace(task_t *child)
signal_wake_up(child, 1);
}
}
if (child->signal->flags & SIGNAL_GROUP_EXIT) {
sigaddset(&child->pending.signal, SIGKILL);
signal_wake_up(child, 1);
}
spin_unlock(&child->sighand->siglock);
}

Expand All @@ -77,8 +81,7 @@ void __ptrace_unlink(task_t *child)
SET_LINKS(child);
}

if (child->state == TASK_TRACED)
ptrace_untrace(child);
ptrace_untrace(child);
}

/*
Expand Down
6 changes: 3 additions & 3 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,8 +1108,8 @@ void zap_other_threads(struct task_struct *p)
if (t != p->group_leader)
t->exit_signal = -1;

/* SIGKILL will be handled before any pending SIGSTOP */
sigaddset(&t->pending.signal, SIGKILL);
rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending);
signal_wake_up(t, 1);
}
}
Expand Down Expand Up @@ -1879,9 +1879,9 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
/* Let the debugger run. */
ptrace_stop(signr, signr, info);

/* We're back. Did the debugger cancel the sig? */
/* We're back. Did the debugger cancel the sig or group_exit? */
signr = current->exit_code;
if (signr == 0)
if (signr == 0 || current->signal->flags & SIGNAL_GROUP_EXIT)
continue;

current->exit_code = 0;
Expand Down

0 comments on commit ab118c9

Please sign in to comment.