raise the SIGABRT signal to terminate program execution
#include <stdlib.h> void abort( void );
The abort() function raises the signal SIGABRT. The default action for SIGABRT is to terminate program execution, returning control to the process that started the calling program (usually the operating system). The status unsuccessful termination is returned to the invoking process by means of the function call raise(SIGABRT). Under QNX, the status value is 12.
The abort() function does not return to its caller.
atexit(), _bgetcmd(), close(), exec... functions, exit(), _exit(), getcmd(), getenv(), main(), onexit(), putenv(), sigaction(), signal(), spawn... functions, system(), wait(), waitpid()
#include <stdlib.h> void main() { int major_error = 1; if( major_error ) abort(); }
ANSI
All (except DOS/PM)