1 .\" Copyright 2007 (C) Michael Kerrisk <mtk.manpages@gmail.com>
2 .\" some parts Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\" References consulted:
7 .\" Linux libc source code
8 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
10 .\" Modified Sat Jul 24 21:46:21 1993 by Rik Faith (faith@cs.unc.edu)
11 .\" Modified Fri Aug 4 10:51:53 2000 - patch from Joseph S. Myers
12 .\" 2007-12-15, mtk, Mostly rewritten
14 .TH ABORT 3 (date) "Linux man-pages (unreleased)"
16 abort \- cause abnormal process termination
19 .RI ( libc ", " \-lc )
22 .B #include <stdlib.h>
24 .B noreturn void abort(void);
29 function first unblocks the
31 signal, and then raises that signal for the calling process
35 This results in the abnormal termination of the process unless the
37 signal is caught and the signal handler does not return
43 signal is ignored, or caught by a handler that returns, the
45 function will still terminate the process.
46 It does this by restoring the default disposition for
48 and then raising the signal for a second time.
52 function never returns.
54 For an explanation of the terms used in this section, see
62 Interface Attribute Value
65 T} Thread safety MT-Safe
71 SVr4, POSIX.1-2001, POSIX.1-2008, 4.3BSD, C89, C99.
76 function caused process termination,
77 all open streams were closed and flushed (as with
79 However, in some cases this could result in deadlocks and data corruption.
80 Therefore, starting with glibc 2.27,
81 .\" glibc commit 91e7cf982d0104f0e71770f5ae8e3faf352dea9f
83 terminates the process without flushing streams.
84 POSIX.1 permits either possible behavior, saying that
86 "may include an attempt to effect fclose() on all open streams".