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

NAME

6       abort - generate an abnormal process abort
7

SYNOPSIS

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

DESCRIPTION

15       The abort() function shall cause abnormal process termination to occur,
16       unless the signal SIGABRT is being caught and the signal  handler  does
17       not return.
18
19       The  abnormal  termination processing shall include the default actions
20       defined for SIGABRT and may include an attempt to  effect  fclose()  on
21       all open streams.
22
23       The  SIGABRT signal shall be sent to the calling process as if by means
24       of raise() with the argument SIGABRT.
25
26       The status made available to wait() or waitpid() by  abort()  shall  be
27       that  of a process terminated by the SIGABRT signal.  The abort() func‐
28       tion shall override blocking or ignoring the SIGABRT signal.
29

RETURN VALUE

31       The abort() function shall not return.
32

ERRORS

34       No errors are defined.
35
36       The following sections are informative.
37

EXAMPLES

39       None.
40

APPLICATION USAGE

42       Catching the signal is intended to provide the application writer  with
43       a  portable  means to abort processing, free from possible interference
44       from any implementation-defined functions.
45

RATIONALE

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

FUTURE DIRECTIONS

80       None.
81

SEE ALSO

83       exit() , kill() , raise() , signal() , wait() , waitpid()  ,  the  Base
84       Definitions volume of IEEE Std 1003.1-2001, <stdlib.h>
85
87       Portions  of  this text are reprinted and reproduced in electronic form
88       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
89       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
90       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
91       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
92       event of any discrepancy between this version and the original IEEE and
93       The  Open Group Standard, the original IEEE and The Open Group Standard
94       is the referee document. The original Standard can be  obtained  online
95       at http://www.opengroup.org/unix/online.html .
96
97
98
99IEEE/The Open Group                  2003                             ABORT(P)
Impressum