How is it possible multiple signals can get into handler even when signal is disabled?

view full story

http://stackoverflow.com – So I have the following code segment as part of my program. Handler is the handler for the SIGALRM. static void handler(void) { //DISABLE SIGALRM sigset_t oldset; disable_sigalrm(&oldset); if(queue_length(&queue) == 0) { ucontext_t context; getcontext(&context); swapcontext(&context,&uctxt_main); } else { //... //enable sigalarm } } The program disable_sigalrm looks as follows: void disable_sigalrm(sigset_t* oldset) { sigset_t sset; //Empty (HowTos)