4.2BSD and Signals
Peter Wolfe
wolfe at winston.UUCP
Sat Jan 25 03:33:07 AEST 1986
Well, is my face slightly red or what!!! I discovered what the problem
was.
The man page for sig block says:
Signal i is blocked if the i-th bit in mask is a 1.
well, what they really want you to do is:
to block signal X set the (X-1) bit in the mask
E.g.
sigblock(1 << (SIGVTALRM - 1));
will block SIGVTALRM.
Of course once I had posted the article and described the problem to a
colleague the solution seemed obvious (I also looked at the kernel code and
noticed the (sig-1) used).
So there you have it. Read the manual and read between the manual if
system == UNIX.
--
Peter Wolfe
New Media Technologies
..decvax!microsoft!ubc-vision!winston!wolfe
..ihnp4!alberta!ubc-vision!winston!wolfe
More information about the Comp.unix.wizards
mailing list