(An ISO C (and ANSI C...) signal, and therefore also a UN*X signal:)
On any ISO C implementation, but also on Unix, Linux and the other Unixoids which might not necessarily support ISO C, SIGABRT is the "abort" signal. Unlike other "asynchronous" signals, SIGABRT is (normally) delivered only at well-defined points of program execution, making it "synchronous". In other words, barring calls to kill to send it, which really shouldn't happen, you can only get it if you asked for it.

A program can call abort() to send itself SIGABRT. This is normally done by a program to attempt to shutdown after a severe internal error, and (hopefully) before causing any serious damage. The assert() macro of assert.h, when compiled to run, tests for a condition; if the test fails, it calls abort().

Any arrangements for a clean shutdown of the program, such as flushing of output buffers, may or may not occur before delivery of the signal. The default action on UN*X systems is to terminate immediately, dumping core. This is useful for analysis with a debugger.

To generate a SIGABRT in the comfort of your own $HOME, do something awful to a program. For instance, trigger a compiler bug in gcc.

Log in or register to write something here or to contact authors.