RAD Studio |  |

abort

Header File

stdlib.h

Category

Process Control Routines

Prototype

void abort(void);

Description

Abnormally terminates a program.

abort causes an abnormal program termination by calling raise(SIGABRT). If there is no signal handler for SIGABRT, then abort writes a termination message (Abnormal program termination) on stderr, then aborts the program by a call to _exit with exit code 3.

Return Value

abort returns the exit code 3 to the parent process or to the operating system command processor.

Example

Copy Code

    #include <stdio.h>
    #include <stdlib.h>
     int main(void)
     {
       printf("Calling abort()\n");
       abort();
       return 0; /* This is never reached */
     }

Portability

POSIX | Win32 | ANSI C | ANSI C++
+ | + | + | +

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!