1651
1652 if (!likely(sig->flags & SIGNAL_STOP_DEQUEUED) ||
1653 unlikely(signal_group_exit(sig)))
1654 return 0;
1655
1656
1657
1658
1659 sig->group_exit_code = signr;
1660
1661 stop_count = 0;
1662 for (t = next_thread(current); t != current; t = next_thread(t))
1663
1664
1665
1666
1667
1668 if (!(t->flags & PF_EXITING) &&
1669 !task_is_stopped_or_traced(t)) {
1670 stop_count++;
1671 signal_wake_up(t, 0);
1672 }
1673 sig->group_stop_count = stop_count;
1674 }
1675
1676 if (stop_count == 0)
1677 sig->flags = SIGNAL_STOP_STOPPED;
1678 current->exit_code = sig->group_exit_code;
1679 __set_current_state(TASK_STOPPED);
1680
1681 spin_unlock_irq(¤t->sighand->siglock);
1682 finish_stop(stop_count);
1683 return 1;
1684}
1685
1686static int ptrace_signal(int signr, siginfo_t *info,
1687 struct pt_regs *regs, void *cookie)
1688{
1689 if (!(current->ptrace & PT_PTRACED))
1690 return signr;
1691