The GNU C Library - Basic Signal Handling Go to the first , previous , next , last section, table of contents . 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 section Standard Signals . Your program generally should not ignore signals that represent serious events or that are normally used to request termination.