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()  first  unblocks  the SIGABRT signal, and then raises that
15       signal for the calling process (as though raise(3) was  called).   This
16       results  in  the abnormal termination of the process unless the SIGABRT
17       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
30       attributes(7).
31
32       ┌──────────┬───────────────┬─────────┐
33Interface Attribute     Value   
34       ├──────────┼───────────────┼─────────┤
35abort()   │ Thread safety │ MT-Safe │
36       └──────────┴───────────────┴─────────┘

NOTES

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

CONFORMING TO

47       SVr4, POSIX.1-2001, POSIX.1-2008, 4.3BSD, C89, C99.
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 4.15 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                               2017-11-26                          ABORT(3)
Impressum