The signal function provides a simple interface for establishing an action for a particular signal. This is the type of signal handler functions.
Signal handlers take one integer argument specifying the signal number, and have return type void .
The signal function establishes action as the action for the signal signum . The first argument, signum , identifies the signal whose behavior you want to control, and should be a signal number. The second argument, action , specifies the action to use for the signal signum . The default actions for various kinds of signals are stated in Standard Signals . Your program generally should not ignore signals that represent serious events or that are normally used to request termination.