signal.h

This header file declares data types, macros, and functions sending and receiving software interrupts.

Signals are invoked, or raised, using the raise() function. When a signal is raised its associated function is executed.

In the EWL implementation a signal can only be invoked through the raise() function and, in the case of the SIGABRT abort() function. When a signal is raised, its signal handling function is executed as a normal function call.

The default signal handler for all signals except SIGTERM is SIG_DFL. The SIG_DFL function aborts a program with the abort() function, while the SIGTERM signal calls the exit() function. The ISO/IEC standard specifies that the SIG prefix used by the signal.h macros is reserved for future use. You should avoid using the prefix to prevent conflicts with future specifications of the Standard Library.

The type sig_atomic_t can be accessed as an incorruptible, atomic entity during an asynchronous interrupt. The number of signals is defined by __signal_max, defined in signal.h.

CAUTION:
Using non-reentrant functions from within a signal handler is not recommended in any system that can throw signals in hardware. Signals are interrupts, and can be invoked at any point during a program's execution. Also, even functions designed to be re-entrant can fail if you re-enter them from a signal handler.