[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


abort

Abnormal program termination.

Compatibility:

This function is compatible with the following targets:

ANSI

BeOS

EMB/RTOS

Mac OS

Palm OS

Win32


Prototype:
#include <stdlib.h>
void abort(void)
Parameters:

None

Remarks:

The abort() function raises the SIGABRT signal and quits the program to return to the operating system.

The abort() function will not terminate the program if a programmer-installed signal handler uses longjmp() instead of returning normally.

See Also:

"assert", "longjmp", "raise", "signal", "atexit", "exit"

Example of abort() usage.:
#include <stdlib.h>
#include <stdio.h>

int main(void)
{
	char c;

	printf("Aborting the program.\n");
	printf("Press return.\n");

	// wait for the return key to be pressed
	c = getchar();

	// abort the program
	abort();

	return 0;
}

Output:
Aborting the program.
Press return.


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 16, 2000