sigprocmask not working
Posted
by EpsilonVector
on Stack Overflow
See other posts from Stack Overflow
or by EpsilonVector
Published on 2010-05-26T05:15:42Z
Indexed on
2010/05/26
5:21 UTC
Read the original article
Hit count: 215
linux
|sigprocmask
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?
© Stack Overflow or respective owner