CINXE.COM

abort

<html> <head> <title>abort</title> <META NAME="KEYWORDS" CONTENT="abort"> </head> <body BGCOLOR="#ffffff" LINK="#0000ff" VLINK="#0000ff" ALINK="#0000ff" TEXT="#000000"> <center> <h1><b>abort</b></h1></center> <PRE> <STRONG><A HREF="/man3/ABORT">ABORT(3)</A></STRONG> Linux Programmer's Manual <STRONG><A HREF="/man3/ABORT">ABORT(3)</A></STRONG> NAME abort - cause abnormal process termination SYNOPSIS #include &lt;stdlib.h&gt; void abort(void); DESCRIPTION The abort() function first unblocks the SIGABRT signal, and then raises that signal for the calling process (as though <STRONG><A HREF="/man3/raise">raise(3)</A></STRONG> was called). This results in the abnormal termination of the process unless the SIGABRT signal is caught and the signal handler does not return (see <STRONG><A HREF="/man3/longjmp">longjmp(3)</A></STRONG>). If the SIGABRT signal is ignored, or caught by a handler that returns, the abort() function will still terminate the process. It does this by restoring the default disposition for SIGABRT and then raising the sig- nal for a second time. RETURN VALUE The abort() function never returns. ATTRIBUTES For an explanation of the terms used in this section, see at- <STRONG><A HREF="/man7/tributes">tributes(7)</A></STRONG>. +----------+---------------+---------+ |Interface | Attribute | Value | +----------+---------------+---------+ |abort() | Thread safety | MT-Safe | +----------+---------------+---------+ NOTES Up until glibc 2.26, if the abort() function caused process termina- tion, all open streams were closed and flushed (as with <STRONG><A HREF="/man3/fclose">fclose(3)</A></STRONG>). However, in some cases this could result in deadlocks and data corrup- tion. Therefore, starting with glibc 2.27, abort() terminates the process without flushing streams. POSIX.1 permits either possible be- havior, saying that abort() "may include an attempt to effect fclose() on all open streams". CONFORMING TO SVr4, POSIX.1-2001, POSIX.1-2008, 4.3BSD, C89, C99. SEE ALSO <STRONG><A HREF="/man1/gdb">gdb(1)</A></STRONG>, <STRONG><A HREF="/man2/sigaction">sigaction(2)</A></STRONG>, <STRONG><A HREF="/man3/assert">assert(3)</A></STRONG>, <STRONG><A HREF="/man3/exit">exit(3)</A></STRONG>, <STRONG><A HREF="/man3/longjmp">longjmp(3)</A></STRONG>, <STRONG><A HREF="/man3/raise">raise(3)</A></STRONG> COLOPHON This page is part of release 5.05 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU 2017-11-26 <STRONG><A HREF="/man3/ABORT">ABORT(3)</A></STRONG></PRE> <center> <h6>Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2025 <a href="http://www.he.net">Hurricane Electric</a>. All Rights Reserved.</h6></center> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10