I'm using sigprocmask as follows:
void mask(){
sigset_t new_set,old_set;
sigemptyset(&new_set);
sigaddset(&new_set,SIGALRM);
sigprocmask(SIG_BLOCK, &new_set, &old_set);
}
and to my surprise a function which prints a big list somehow gets interrupted by the signal, even though I invoke mask() at its beginning. It looks as if mask fails, since my function doesn't invoke any other functions and therefore nowhere in its run should an unmask() happen. What can cause sigprocmask to fail?