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
11

NAME

13       abort — generate an abnormal process abort
14

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

43       The abort() function shall not return.
44

ERRORS

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

EXAMPLES

51       None.
52

APPLICATION USAGE

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

RATIONALE

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

FUTURE DIRECTIONS

91       None.
92

SEE ALSO

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