abort(3)

abort3

Cause abnormal program termination

Usage

#include <stdlib.h>

void

abort(void);

Library

Standard C Library (libc, -lc)

Overview

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.

Implementation notes

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

The abort() function causes a report to be generated by Crash Reporter. If you wish to terminate without generating a crash report, use exit(3) instead.

Return values

The abort() function never returns.

Releases

163 releases since Mac OS X 10.0; the text changed 2 times.

  1. 10.0–10.1.5
  2. 10.2–10.6.8
  3. 10.7–26.5

Standards

The abort() function conforms to ISO/IEC 9945-1:1990 (“POSIX.1”). The abort() function also conforms to ISO/IEC 9899:1999 (“ISO C99”) with the implementation specific details as noted above.

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.