Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95121
b: refs/heads/master
c: f8c5b5c
h: refs/heads/master
i:
  95119: d1bd367
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Apr 30, 2008
1 parent ede44c1 commit 5a4ff1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: 5fc894bb4fb1de8373d1d5fb6db19204a16859e8
refs/heads/master: f8c5b5c06f63fe9aaebefbf9f0b79909066b1b6c
17 changes: 9 additions & 8 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ static inline int wants_signal(int sig, struct task_struct *p)
static void
__group_complete_signal(int sig, struct task_struct *p)
{
struct signal_struct *signal = p->signal;
struct task_struct *t;

/*
Expand All @@ -862,29 +863,29 @@ __group_complete_signal(int sig, struct task_struct *p)
/*
* Otherwise try to find a suitable thread.
*/
t = p->signal->curr_target;
t = signal->curr_target;
if (t == NULL)
/* restart balancing at this thread */
t = p->signal->curr_target = p;
t = signal->curr_target = p;

while (!wants_signal(sig, t)) {
t = next_thread(t);
if (t == p->signal->curr_target)
if (t == signal->curr_target)
/*
* No thread needs to be woken.
* Any eligible threads will see
* the signal in the queue soon.
*/
return;
}
p->signal->curr_target = t;
signal->curr_target = t;
}

/*
* Found a killable thread. If the signal will be fatal,
* then start taking the whole group down immediately.
*/
if (sig_fatal(p, sig) && !(p->signal->flags & SIGNAL_GROUP_EXIT) &&
if (sig_fatal(p, sig) && !(signal->flags & SIGNAL_GROUP_EXIT) &&
!sigismember(&t->real_blocked, sig) &&
(sig == SIGKILL || !(t->ptrace & PT_PTRACED))) {
/*
Expand All @@ -897,9 +898,9 @@ __group_complete_signal(int sig, struct task_struct *p)
* running and doing things after a slower
* thread has the fatal signal pending.
*/
p->signal->flags = SIGNAL_GROUP_EXIT;
p->signal->group_exit_code = sig;
p->signal->group_stop_count = 0;
signal->flags = SIGNAL_GROUP_EXIT;
signal->group_exit_code = sig;
signal->group_stop_count = 0;
t = p;
do {
sigaddset(&t->pending.signal, SIGKILL);
Expand Down

0 comments on commit 5a4ff1c

Please sign in to comment.