Right I'm assuming you are using Linux or something compatible with it...
Here's the ACTUAL signal handling code from 2.6.27:
Code:
928 int
929 force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
930 {
931 unsigned long int flags;
932 int ret, blocked, ignored;
933 struct k_sigaction *action;
934
935 spin_lock_irqsave(&t->sighand->siglock, flags);
936 action = &t->sighand->action[sig-1];
937 ignored = action->sa.sa_handler == SIG_IGN;
938 blocked = sigismember(&t->blocked, sig);
939 if (blocked || ignored) {
940 action->sa.sa_handler = SIG_DFL;
941 if (blocked) {
942 sigdelset(&t->blocked, sig);
943 recalc_sigpending_and_wake(t);
944 }
945 }
946 if (action->sa.sa_handler == SIG_DFL)
947 t->signal->flags &= ~SIGNAL_UNKILLABLE;
948 ret = specific_send_sig_info(sig, info, t);
949 spin_unlock_irqrestore(&t->sighand->siglock, flags);
950
951 return ret;
952 }
A blocked signal is automatically unblocked when you receive that signal, which is how the "infinite loop" is solved. So the block works, it's just that you receive the same signal again immediately, which is why you do not think that it's working.
--
Mats