SIGABRT

From Wikipedia, the free encyclopedia

SIGABRT
Description Abort signal from abort
Default action Abnormal termination of the process
SA_SIGINFO macros
None

On POSIX-compliant platforms, SIGABRT is the signal sent by computer programs to abort the process. In source code, SIGABRT is a symbolic constant defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms.

On some platforms such as Linux and AIX, SIGIOT is a synonym for SIGABRT.

[edit] Etymology

SIG is a common prefix for signal names. ABRT is an abbreviation for abort. IOT is an abbreviation of IOT trap, where IOT itself stands for I/O transfer, an instruction on the historic PDP-8 architecture.

[edit] Usage

SIGABRT is sent by the process to itself when it calls the abort libc function, defined in stdlib.h. The SIGABRT signal can be caught, but it cannot be blocked; if the signal handler returns then all open streams are closed and flushed and the program terminates (dumping core if appropriate). This means that the abort call never returns. Because of this characteristic, it is often used to signal fatal conditions in support libraries, situations where the current operation cannot be completed but the main program can perform cleanup before exiting. It is also used if an assertion fails.