abort
raw OCR
Abnormally terminates a program.
Defined in header <stdlib.h>
Syntax
#include <stdlib.h>
void abort(void);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ | ■ | ■ |
Remarks
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 DOS.
See also
Example
#include <stdio.h>
#include <stdlib.h>
int main (void)
printf ("Calling abort()\n");
abort ();
return 0; /* This is never reached */
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/stdlib.h/abort/
· short form /3.1/abort/