ssignal(3C) ssignal(3C)
NAME
ssignal, gsignal - software signals
SYNOPSIS
#include <signal.h>
int (*ssignal(int sig, int (*action) (int))) (int);
int gsignal(int sig);
DESCRIPTION
ssignal() and gsignal() implement a software facility similar to sig-
nal(2).
The software signals provided are associated with integers in the
inclusive range 1 through 17. A call to ssignal() associates a pro-
cedure, action, with the software signal sig. sig, is raised by a call
to gsignal(). The effect is to execute the action established for that
signal.
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) func-
tion, action, or one of the manifest constants SIGDFL (default) or
SIGIGN (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 SIGDFL.
gsignal() raises the signal identified by its argument, sig:
- If an action has been established for sig, then that action is
reset to SIGDFL and the action is entered with argument sig. gsig-
nal() returns the value returned to it by the action.
- If the action for sig is SIGIGN, gsignal() returns the value 1 and
takes no other action.
- If the action for sig is SIGDFL, gsignal() returns the value 0 and
takes no other action.
- If sig has an illegal value or no action was ever specified for
sig, gsignal() returns the value 0 and takes no other action.
SEE ALSO
signal(2), sigset(2), raise(3C).
Page 1 Reliant UNIX 5.44 Printed 11/98
ssignal(3C) ssignal(3C)
Page 2 Reliant UNIX 5.44 Printed 11/98