Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95129
b: refs/heads/master
c: 5fcd835
h: refs/heads/master
i:
  95127: e0ce107
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Apr 30, 2008
1 parent 1788e9c commit 71cf9cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 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: 2ca3515aa57224edf0151e05a8c9f21a76bf5957
refs/heads/master: 5fcd835bf8c2cde06404559b1904e2f1dfcb4567
15 changes: 6 additions & 9 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,7 @@ static inline int wants_signal(int sig, struct task_struct *p)
return task_curr(p) || !signal_pending(p);
}

static void
__group_complete_signal(int sig, struct task_struct *p)
static void complete_signal(int sig, struct task_struct *p, int group)
{
struct signal_struct *signal = p->signal;
struct task_struct *t;
Expand All @@ -687,7 +686,7 @@ __group_complete_signal(int sig, struct task_struct *p)
*/
if (wants_signal(sig, p))
t = p;
else if (thread_group_empty(p))
else if (!group || thread_group_empty(p))
/*
* There is just one thread and it does not need to be woken.
* It will dequeue unblocked signals before it runs again.
Expand Down Expand Up @@ -871,8 +870,7 @@ specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
if (ret <= 0)
return ret;

if (!sigismember(&t->blocked, sig))
signal_wake_up(t, sig == SIGKILL);
complete_signal(sig, t, 0);
return 0;
}

Expand Down Expand Up @@ -930,7 +928,7 @@ __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
if (ret <= 0)
return ret;

__group_complete_signal(sig, p);
complete_signal(sig, p, 1);
return 0;
}

Expand Down Expand Up @@ -1309,8 +1307,7 @@ int send_sigqueue(int sig, struct sigqueue *q, struct task_struct *p)

ret = do_send_sigqueue(sig, q, p, 0);

if (!sigismember(&p->blocked, sig))
signal_wake_up(p, sig == SIGKILL);
complete_signal(sig, p, 0);

unlock_task_sighand(p, &flags);
out_err:
Expand All @@ -1330,7 +1327,7 @@ send_group_sigqueue(int sig, struct sigqueue *q, struct task_struct *p)

ret = do_send_sigqueue(sig, q, p, 1);

__group_complete_signal(sig, p);
complete_signal(sig, p, 1);

spin_unlock_irqrestore(&p->sighand->siglock, flags);

Expand Down

0 comments on commit 71cf9cc

Please sign in to comment.