1ABORT(3P)                  POSIX Programmer's Manual                 ABORT(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       abort — generate an abnormal process abort
13

SYNOPSIS

15       #include <stdlib.h>
16
17       void abort(void);
18

DESCRIPTION

20       The functionality described on this reference page is aligned with  the
21       ISO C  standard.  Any  conflict between the requirements described here
22       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2017
23       defers to the ISO C standard.
24
25       The abort() function shall cause abnormal process termination to occur,
26       unless the signal SIGABRT is being caught and the signal  handler  does
27       not return.
28
29       The  abnormal  termination processing shall include the default actions
30       defined for SIGABRT and may include an attempt to  effect  fclose()  on
31       all open streams.
32
33       The  SIGABRT signal shall be sent to the calling process as if by means
34       of raise() with the argument SIGABRT.
35
36       The status made available to wait(), waitid(), or waitpid() by  abort()
37       shall  be  that  of  a  process  terminated by the SIGABRT signal.  The
38       abort() function shall override blocking or ignoring the  SIGABRT  sig‐
39       nal.
40

RETURN VALUE

42       The abort() function shall not return.
43

ERRORS

45       No errors are defined.
46
47       The following sections are informative.
48

EXAMPLES

50       None.
51

APPLICATION USAGE

53       Catching  the  signal  is intended to provide the application developer
54       with a portable means to abort processing, free from possible interfer‐
55       ence from any implementation-supplied functions.
56

RATIONALE

58       The  ISO/IEC 9899:1999  standard  requires  the  abort() function to be
59       async-signal-safe. Since POSIX.1‐2008 defers  to  the  ISO C  standard,
60       this  required  a  change  to  the DESCRIPTION from ``shall include the
61       effect of fclose()'' to ``may include an attempt to effect fclose().''
62
63       The revised wording permits some backwards-compatibility and  avoids  a
64       potential deadlock situation.
65
66       The  Open  Group  Base  Resolution bwg2002‐003 is applied, removing the
67       following XSI shaded paragraph from the DESCRIPTION:
68
69       ``On XSI-conformant systems, in addition the abnormal termination  pro‐
70       cessing  shall  include  the  effect  of  fclose()  on  message catalog
71       descriptors.''
72
73       There were several reasons to remove this paragraph:
74
75        *  No special processing of open message catalogs  needs  to  be  per‐
76           formed prior to abnormal process termination.
77
78        *  The  main  reason to specifically mention that abort() includes the
79           effect of fclose() on open streams is to flush output queued on the
80           stream.  Message catalogs in this context are read-only and, there‐
81           fore, do not need to be flushed.
82
83        *  The effect of fclose() on a message catalog descriptor is  unspeci‐
84           fied.  Message catalog descriptors are allowed, but not required to
85           be implemented using a file descriptor, but there is no mention  in
86           POSIX.1‐2008  of  a message catalog descriptor using a standard I/O
87           stream FILE object as would be expected by fclose().
88

FUTURE DIRECTIONS

90       None.
91

SEE ALSO

93       exit(), kill(), raise(), signal(), wait(), waitid()
94
95       The Base Definitions volume of POSIX.1‐2017, <stdlib.h>
96
98       Portions of this text are reprinted and reproduced in  electronic  form
99       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
100       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
101       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
102       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
103       event of any discrepancy between this version and the original IEEE and
104       The Open Group Standard, the original IEEE and The Open Group  Standard
105       is  the  referee document. The original Standard can be obtained online
106       at http://www.opengroup.org/unix/online.html .
107
108       Any typographical or formatting errors that appear  in  this  page  are
109       most likely to have been introduced during the conversion of the source
110       files to man page format. To report such errors,  see  https://www.ker
111       nel.org/doc/man-pages/reporting_bugs.html .
112
113
114
115IEEE/The Open Group                  2017                            ABORT(3P)
Impressum