1SIGNAL(3F)                                                          SIGNAL(3F)
2
3
4

NAME

6       signal - change the action for a signal
7

SYNOPSIS

9       integer function signal(signum, proc, flag)
10       integer signum, flag
11       external proc
12

DESCRIPTION

14       When  a  process incurs a signal (see signal(3C)) the default action is
15       usually to clean up and abort.  The user may choose to write an  alter‐
16       native  signal  handling  routine.   A  call  to signal is the way this
17       alternate action is specified to the system.
18
19       Signum is the signal number (see signal(3C)).   If  flag  is  negative,
20       then  proc  must  be  the name of the user signal handling routine.  If
21       flag is zero or positive, then proc is ignored and the value of flag is
22       passed  to  the system as the signal action definition.  In particular,
23       this is how previously saved signal actions can be restored.  Two  pos‐
24       sible  values for flag have specific meanings: 0 means "use the default
25       action" (See NOTES below), 1 means "ignore this signal".
26
27       A positive returned value is the previous action definition.   A  value
28       greater than 1 is the address of a routine that was to have been called
29       on occurrence of the given signal.  The returned value can be  used  in
30       subsequent  calls to signal in order to restore a previous action defi‐
31       nition.  A negative returned value is the negation of  a  system  error
32       code.  (See perror(3F))
33

FILES

35       /usr/lib/libU77.a
36

SEE ALSO

38       signal(3C), kill(3F), kill(1)
39

NOTES

41       f77  arranges  to  trap certain signals when a process is started.  The
42       only way to restore the default f77 action  is  to  save  the  returned
43       value from the first call to signal.
44
45       If the user signal handler is called, it will be passed the signal num‐
46       ber as an integer argument.
47
48
49
504.2 Berkeley Distribution        May 15, 1985                       SIGNAL(3F)
Impressum