out_set:
        sigaddset(&pending->signal, sig);
-       return 1;
+       complete_signal(sig, t, group);
+       return 0;
 }
 
 int print_fatal_signals;
 
 __setup("print-fatal-signals=", setup_print_fatal_signals);
 
+int
+__group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
+{
+       return send_signal(sig, info, p, 1);
+}
+
 static int
 specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
 {
-       int ret;
-
-       ret = send_signal(sig, info, t, 0);
-       if (ret <= 0)
-               return ret;
-
-       complete_signal(sig, t, 0);
-       return 0;
+       return send_signal(sig, info, t, 0);
 }
 
 /*
        force_sig_info(sig, SEND_SIG_FORCED, t);
 }
 
-int
-__group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
-{
-       int ret;
-
-       /*
-        * Put this signal on the shared-pending queue, or fail with EAGAIN.
-        * We always use the shared queue for process-wide signals,
-        * to avoid several races.
-        */
-       ret = send_signal(sig, info, p, 1);
-       if (ret <= 0)
-               return ret;
-
-       complete_signal(sig, p, 1);
-       return 0;
-}
-
 /*
  * Nuke all other threads in the group.
  */
 {
        struct sigpending *pending;
 
+       BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
        handle_stop_signal(sig, t);
 
        if (unlikely(!list_empty(&q->list))) {
        pending = group ? &t->signal->shared_pending : &t->pending;
        list_add_tail(&q->list, &pending->list);
        sigaddset(&pending->signal, sig);
+       complete_signal(sig, t, group);
 
        return 0;
 }
        unsigned long flags;
        int ret = -1;
 
-       BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
-
        /*
         * The rcu based delayed sighand destroy makes it possible to
         * run this without tasklist lock held. The task struct itself
 
        ret = do_send_sigqueue(sig, q, p, 0);
 
-       complete_signal(sig, p, 0);
-
        unlock_task_sighand(p, &flags);
 out_err:
        return ret;
        unsigned long flags;
        int ret;
 
-       BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
-
        /* Since it_lock is held, p->sighand cannot be NULL. */
        spin_lock_irqsave(&p->sighand->siglock, flags);
 
        ret = do_send_sigqueue(sig, q, p, 1);
 
-       complete_signal(sig, p, 1);
-
        spin_unlock_irqrestore(&p->sighand->siglock, flags);
 
        return ret;