I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
ComputingCStdlib.h

abort

Cause abnormal program termination
+ View other versions (3)

Interface

#include <stdlib.h>
void abort (void)

Description

The abort function causes abnormal program termination to occur, unless the signal SIGABRT is being caught and the signal handler does not return.

Any open streams are flushed and closed.

Example:
Example - Cause abnormal program termination
Workings
#include <stdlib.h>
int main()
{
  int a = 2;
  abort();
 
  // this will never execute
  a = 3;
 
  return 0;
}

Implementation Notes

The abort function is thread-safe. It is unknown if it is async-cancel-safe.

Return Values

The abort function never returns.