SSIGNAL(3C) DOMAIN/IX SYS5 SSIGNAL(3C)
NAME
ssignal, gsignal, - software signals
USAGE
#include <signal.h>
int(*ssignal(sig, action))( )
int sig, (*action)();
int gsignal(sig)
int sig;
DESCRIPTION
Ssignal and gsignal implement a software facility similar to
that provided by signal(2). This facility, used by the
Standard C Library, allows you to specify how to dispose of
error conditions.
Software signals available to you are associated with
integers in the inclusive range 1 through 15. A call to
ssignal associates a procedure, action, with the software
signal sig. The software signal, sig, is raised by a call
to gsignal. Raising a software signal causes the action
established for that signal to be taken.
The first argument to ssignal is a number identifying the
type of signal for which an action is to be established.
The second argument defines the action; it is either the
name of a (user-defined) "action function" or one of the
manifest constants SIG_DFL (default) or SIG_IGN (ignore).
Ssignal returns the action previously established for that
signal type; if no action has been established or the signal
number is illegal, ssignal returns SIG_DFL.
Gsignal raises the signal identified by its argument, sig,
in the following cases.
⊕ If an action function has been established for sig, then
that action is reset to SIG_DFL and the action function
is entered with argument sig. Gsignal returns the value
returned to it by the action function.
⊕ If the action for sig is SIG_IGN, gsignal returns the
value 1 and takes no other action.
If the action for sig is SIG_DFL, gsignal returns the
value zero and takes no other action.
⊕ If sig has an illegal value or no action was ever
Printed 12/4/86 SSIGNAL-1
SSIGNAL(3C) DOMAIN/IX SYS5 SSIGNAL(3C)
specified for sig, gsignal returns the value zero and
takes no other action.
NOTES
There are additional signals, with numbers outside the range
1 through 15, that are used by the other library functions
to indicate error conditions; these are defined in
<signal.h>. If you specify one of them as sig, your program
may interfere with the normal operation of these functions.
RELATED INFORMATION
signal(2)
SSIGNAL-2 Printed 12/4/86