Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105921
b: refs/heads/master
c: d443420
h: refs/heads/master
i:
  105919: 5a10c77
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jul 25, 2008
1 parent 4b5b8ce commit 520ca5a
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: 6715ca451cfff1c9ce4b33ad9918a1dacf43997c
refs/heads/master: d4434207616980885205c605697868c0f07e4378
15 changes: 6 additions & 9 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,34 +341,31 @@ unblock_all_signals(void)
static int collect_signal(int sig, struct sigpending *list, siginfo_t *info)
{
struct sigqueue *q, *first = NULL;
int still_pending = 0;

/*
* Collect the siginfo appropriate to this signal. Check if
* there is another siginfo for the same signal.
*/
list_for_each_entry(q, &list->list, list) {
if (q->info.si_signo == sig) {
if (first) {
still_pending = 1;
break;
}
if (first)
goto still_pending;
first = q;
}
}

sigdelset(&list->signal, sig);

if (first) {
still_pending:
list_del_init(&first->list);
copy_siginfo(info, &first->info);
__sigqueue_free(first);
if (!still_pending)
sigdelset(&list->signal, sig);
} else {

/* Ok, it wasn't in the queue. This must be
a fast-pathed signal or we must have been
out of queue space. So zero out the info.
*/
sigdelset(&list->signal, sig);
info->si_signo = sig;
info->si_errno = 0;
info->si_code = 0;
Expand Down

0 comments on commit 520ca5a

Please sign in to comment.