Signal Handling: signal.h

A signal is a condition that can be reported during program execution. It is represented by a positive integer. The raise() function sends, or raises, a signal, and the signal() function sets the response to a particular signal.

The standard provides the macros listed in Table F.8 to represent possible signals; an implementation can add further values. They can be used as arguments to raise() and signal().

Table F.8. Signal macros.
MacroDescription
SIGABRTAbnormal termination, such as initiated by a call to abort().
SIGFPEErroneous arithmetic operation.
SIGILLInvalid function image (such as illegal instruction) detected.
SIGINTInteractive attention signal received (such as a DOS interrupt).
SIGSEGVInvalid access to storage. ...

Get C Primer Plus®, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.