Signals on Sys V

Larry Philps larry at hcr.uucp
Tue Nov 14 01:01:20 AEST 1989


In article <1745 at calvin.cs.mcgill.ca> goof at calvin.cs.mcgill.ca (Paul LOSORDO) writes:
> ...
>I am trying to develop a light-weight processes package for SCO Sys V,
>V 3.2 and I am having troubles getting signals to behave themselves.
> ...
>second one. Since the Dispatcher sets the handler to SIGDFL, this has
>the infortunate effect of killing my process.

In System V Release 3 there are two signal interfaces.  The one you get with
the "signal" system call is the old (but still there for compatability)
broken one in which most signals are reset to SIGDFL when taken.

The other interface appeared in R3 and is accessed via the "sigset" system
call (same arguments as "signal").  Signal handlers invoked after a sigset
behave just like Berkeley signals, that is ensuing signals of the same type
are blocked while the signal handler is running.  Just put a

#define signal sigset

at the start of your program and see if that fixes the problems.  Your
program will certainly be more reliable.

Larry Philps                             HCR Corporation
130 Bloor St. West, 10th floor           Toronto, Ontario.  M5S 1N5
(416) 922-1937                           {utzoo,utcsri}!hcr!larry



More information about the Comp.unix.wizards mailing list