The Regents of the University of California. All rights reserved.
%sccs.include.proprietary.roff%
@(#)signal.3 8.1 (Berkeley) 06/05/93
integer signum, flag
external proc
Signum is the signal number (see signal (3C)). If flag is negative, then proc must be the name of the user signal handling routine. If flag is zero or positive, then proc is ignored and the value of flag is passed to the system as the signal action definition. In particular, this is how previously saved signal actions can be restored. Two possible values for flag have specific meanings: 0 means "use the default action" (See NOTES below), 1 means "ignore this signal".
A positive returned value is the previous action definition. A value greater than 1 is the address of a routine that was to have been called on occurrence of the given signal. The returned value can be used in subsequent calls to signal in order to restore a previous action definition. A negative returned value is the negation of a system error code. (See perror (3F))
If the user signal handler is called, it will be passed the signal number as an integer argument.