7.2 Disposition of a signal

The signal function (prototype in <signal.h>) lets a program specify the disposition of a signal. The prototype of signal is as follows:

sighandler_t signal(int signum, sighandler_t handler);  
    

The signal function takes two parameters. signum is the signal number. handler has three options:

The signal function returns the previous option. This makes it possible to save a signal disposition, change it, then restore the original signal disposition when it is appropriate.