Signals on Sys V

Doug McCallum dougm at queso.ico.isc.com
Wed Nov 15 07:51:34 AEST 1989


In article <1989Nov13.140120.17775 at hcr.uucp> larry at hcr.uucp (Larry Philps) writes:
...
   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

Almost the same as Berkeley signals but there are some subtle
differences.

   #define signal sigset

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

While the above will work for nearly all cases, it can fail.  One of
the differences that can catch the unwary, especially when porting BSD
software, is that a "longjmp" out of a signal handler will reset the
signal to the non-hold state on a BSD system while on a V.3 system you
have to explicitly release the hold.  This could be important in the
case where the stack is being manipulated and the signal handler isn't
returned from directly.

Its also too bad that the "sighold()" and "sigrelse()" calls only take
a signal number and not a mask as with the BSD equivalents.



More information about the Comp.unix.wizards mailing list