The following routine is used at thread init time. The problem is the second
sigaddset() overwrote
the first sigaddset(). Anyone know why this is happening?
The following routine is used at thread init time. The problem is the second
sigaddset() overwrote
the first sigaddset(). Anyone know why this is happening?
Beth <> id@net.com> > wrote:
The following routine is used at thread init time. The problem is the second
sigaddset() overwrote
the first sigaddset(). Anyone know why this is happening?
sigset_t is a local.
if (p_params)
{
sigset_t set;
sigemptyset( &set );
sigaddset( &set, SIGUSR1 );
Sets one bit. Doesn’t change the contents of set.
That should have been:
“Sets one bit. Doesn’t change the other contents of set.”
pthread_sigmask( SIG_UNBLOCK, &set, NULL );
Unmasks SIGUSR1.
sigaddset( &set, SIGALRM);
Sets another bit, now bits for SIGUSR1 and SIGALRM are set in set.