#include <uif.h> #include <terrno.h> int sigsetup() int siglook(type) int type; int sigreset(type) int type; int sigstop(type) int type;
The functions listed here provide a simple and uniform mechanism for catching common interrupt signals (see UNIX signal.h):
SIGHUP - hang up
SIGINT - interrupt (break or ^C)
SIGFPE - floating point exception
The above signals are fatal to the process, unless applications provide their own sigstop routine. If ignoring signals the moment they are received, applications should call siglook periodically to see if signals have been received.
TeraScan supports two signal types: BREAK_SIG and FLOAT_SIG. Both UNIX SIGHUP and SIGINT are considered of type BREAK_SIG. BREAK_SIG and FLOAT_SIG are defined in include/uif.h. The distinction is made between floating point and non-floating point interrupts because they are generated by different sources at different rates.
This seemingly strange re-numbering of signals is a result of the fact that most TeraScan applications were once written in Fortran.
At most one floating point and one non-floating point interrupt can be caught at a time; others are ignored until the 'caught' interrupts are 'reset' by the application by calling sigreset.
Note: Currently SIGQUIT signals are not caught. If this were not true, users might not be unable to stop runaway processes from their own terminals.
sigsetup should be called as soon as possible at the beginning of the application program. As a convenience, sigsetup is called automatically as part of the parameter processing setup.
siglook checks for signals of a given type. If type is ANY_SIG, siglook checks for all types of signals.
sigreset resets or clears signals of a given type. If type is ANY_SIG, sigreset resets all types of signals.
sigstop is an application-provided routine that is called when a signal of a particular type is received.
sigsetup and sigreset always return 0. siglook returns true if a signal of the given type was received.
None.
include/uif.h, include/terrno.h/usr/include/signal.h, lib/libuif.a
None.
Last Update: $Date: 1999/05/10 20:57:05 $