4.2BSD and Signals

Peter Wolfe wolfe at winston.UUCP
Fri Jan 24 09:24:35 AEST 1986


I am having a problem with 4.2BSD signals and would like some light shed on
my problem.

I am using the ITIMER_VIRTUAL interval timer to generate periodic (6666
micro second interval) clock interrupts for a OS I am writing.  The signal
SIGVTALRM is delivered to a catcher function which calls a handler etc.

I also turn off interrupts (i.e. block signals) during critical sections
using oldmask = sigblock(sigs) and sigsetmask(oldmask).

The problem is that I get SIGVTALRM signals delivered when SIGVTALRM is
(well at least it should be) blocked from delivery.  This obviously
causes problems and the OS (the one I am writing) crashes.  I look
(using dbx) at the sc_mask field of the sig_context structure passed to
the signal catcher and lo and behold SIGVTALRM is set as being
ignored!!!  What gives???  Am I missing something???  Has anyone else
had this problem???  The problem can not be reliably repeated but if I
run the program I get about one crash in every seven runs.

Helpppppppppppp .....

Drowning in Signals and handlers.

-- 

    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