Subject: sa_mask's
To: None <>
From: Wolfgang Rupprecht <>
List: current-users
Date: 10/24/1998 17:49:00
I noticed a small problem with sa_masks while investigating why rplayd
wouldn't run.  It appears that sa_masks are now 4 32-bit words (on a
i386) and that sigemptyset() only clears the first 32-bits.  The
sigaction syscall checks all 4-words though.  Sigaction usually gets
an EINVAL unless one is running from a virgin stack, where the 'sa'
struct just happened to be zero-ed out.

    struct sigaction sa;

    sa.sa_handler = timer_update;
    sa.sa_flags = 0;
    sigemptyset (&sa.sa_mask);
    if (sigaction (SIGALRM, &sa, (struct sigaction *) NULL ) < 0)
	die_a_squealing_death();   <<<= this normally gets called.

It looks like sigemptyset() should really be clearing all 4 words, but
I guess someone wanted a bit more backwards compatability.  Who's wrong?

Wolfgang Rupprecht                       <>
Cut down on spam.   Install ORBS support: