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 thrown 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 Linux, 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.

POSIX Signals
SIGABRT | SIGALRM | SIGFPE | SIGHUP | SIGILL | SIGINT | SIGKILL | SIGPIPE | SIGQUIT | SIGSEGV | SIGTERM | SIGUSR1 | SIGUSR2 | SIGCHLD | SIGCONT | SIGSTOP | SIGTSTP | SIGTTIN | SIGTTOU | SIGBUS | SIGPOLL | SIGPROF | SIGSYS | SIGTRAP | SIGURG | SIGVTALRM | SIGXCPU | SIGXFSZ | Realtime Signals are user definable—SIGRTMIN+n through SIGRTMAX.
Common non-POSIX signals and synonyms
SIGIOT | SIGEMT | SIGSTKFLT | SIGIO | SIGCLD | SIGINFO | SIGPWR (SIGINFO) | SIGLOST | SIGWINCH | SIGUNUSED
In other languages