C.3 SignalsSignals are a simple UNIX mechanism for controlling processes. A signal is a 5-bit message to a process that requires immediate attention. Each signal has associated with it a default action; for some signals, you can change this default action. Signals are generated by exceptions, which include:
The system default may be to ignore the signal, to terminate the process receiving the signal (and, optionally, generate a core file), or to suspend the process until it receives a continuation signal. Some signals can be caught - that is, a program can specify a particular function that should be run when the signal is received. By design, UNIX supports exactly 31 signals. They are listed in the files /usr/include/signal.h and /usr/include/sys/signal.h. Table 27.4 contains a summary.
Key:
Signals are normally used between processes for process control. They are also used within a process to indicate exceptional conditions that should be handled immediately (for example, floating-point overflows). |
|