1ABORT(3)                   Linux Programmer's Manual                  ABORT(3)
2
3
4

NAME

6       abort - cause abnormal process termination
7

SYNOPSIS

9       #include <stdlib.h>
10
11       void abort(void);
12

DESCRIPTION

14       The abort() function first unblocks the SIGABRT signal, and then raises
15       that signal for the calling process (as though  raise(3)  was  called).
16       This  results  in  the  abnormal  termination of the process unless the
17       SIGABRT signal is caught and the signal handler does  not  return  (see
18       longjmp(3)).
19
20       If  the SIGABRT signal is ignored, or caught by a handler that returns,
21       the abort() function will still terminate the process.  It does this by
22       restoring the default disposition for SIGABRT and then raising the sig‐
23       nal for a second time.
24

RETURN VALUE

26       The abort() function never returns.
27

ATTRIBUTES

29       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
30       tributes(7).
31
32       ┌──────────┬───────────────┬─────────┐
33Interface Attribute     Value   
34       ├──────────┼───────────────┼─────────┤
35abort()   │ Thread safety │ MT-Safe │
36       └──────────┴───────────────┴─────────┘

CONFORMING TO

38       SVr4, POSIX.1-2001, POSIX.1-2008, 4.3BSD, C89, C99.
39

NOTES

41       Up  until  glibc  2.26, if the abort() function caused process termina‐
42       tion, all open streams were closed and  flushed  (as  with  fclose(3)).
43       However,  in some cases this could result in deadlocks and data corrup‐
44       tion.  Therefore, starting with  glibc  2.27,  abort()  terminates  the
45       process  without flushing streams.  POSIX.1 permits either possible be‐
46       havior, saying that abort() "may include an attempt to effect  fclose()
47       on all open streams".
48

SEE ALSO

50       gdb(1), sigaction(2), assert(3), exit(3), longjmp(3), raise(3)
51

COLOPHON

53       This  page  is  part of release 5.10 of the Linux man-pages project.  A
54       description of the project, information about reporting bugs,  and  the
55       latest     version     of     this    page,    can    be    found    at
56       https://www.kernel.org/doc/man-pages/.
57
58
59
60GNU                               2020-06-09                          ABORT(3)
Impressum