4.7.6. __default_signal_handler()

This function handles a raised signal. The default action is to print an error message and exit.


void __default_signal_handler(int signal, int arg);


The default signal handler uses _ttywrch() toprint a message and calls _sys_exit() to exit. You can replace the default signal handler by defining:

void __default_signal_handler(int signal, int argument)

The interface is the same as __raise(), but this function is only called after the C signal handling mechanism has declined to process the signal.

A complete list of the defined signals is in signal.h. See Table 4.10 for those signals that are used by the libraries.


The signals used by the libraries might change in future releases of the product. See also Table 4.18 for signals handled by the signal() function.

Table 4.10. Signals used by the C and C++ libraries

Signal numberSignal nameDescription
1 SIGABRTThis signal is only used if abort() or assert() are called by your application
2SIGFPEUsed to signal any arithmetic exception, for example, division by zero. Used by hard and soft floating point and by integer division.
7SIGSTAKStack overflow was detected (but only for code compiled with software stack checking ON).
8SIGRTREDRuntime redirection error.
9SIGRTMEMRuntime memory error.
12SIGPVFNA pure virtual function was called from C++.
13SIGCPPLException from C++ library.
Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D