Subject: sa_mask's
To: None <current-users@netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
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
--
Wolfgang Rupprecht <wolfgang@dailyplanet.wsrcc.com>
http://www.wsrcc.com/wolfgang/
Cut down on spam. Install ORBS support: http://www.dorkslayers.com/orbs/