Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/lib/ape/man/3/abort

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "ABORT" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" abort 
.SH PROLOG
This manual page is part of the POSIX Programmer's Manual.
The Linux implementation of this interface may differ (consult
the corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.
.SH NAME
abort \- generate an abnormal process abort
.SH SYNOPSIS
.LP
\fB#include <stdlib.h>
.br
.sp
void abort(void);
.br
\fP
.SH DESCRIPTION
.LP
The \fIabort\fP() function shall cause abnormal process termination
to occur, unless the signal SIGABRT is being caught and the
signal handler does not return.
.LP
The
abnormal termination processing shall include the default actions
defined for SIGABRT and may include an attempt to effect \fIfclose\fP()
on all open streams. 
.LP
The SIGABRT signal shall be sent to the calling process as if by means
of \fIraise\fP()
with the argument SIGABRT.
.LP
The
status made available to \fIwait\fP() or \fIwaitpid\fP() by \fIabort\fP()
shall be that of a process terminated by the SIGABRT signal.
The \fIabort\fP() function shall override blocking or ignoring the
SIGABRT signal.
.SH RETURN VALUE
.LP
The \fIabort\fP() function shall not return.
.SH ERRORS
.LP
No errors are defined.
.LP
\fIThe following sections are informative.\fP
.SH EXAMPLES
.LP
None.
.SH APPLICATION USAGE
.LP
Catching the signal is intended to provide the application writer
with a portable means to abort processing, free from possible
interference from any implementation-defined functions.
.SH RATIONALE
.LP
The ISO/IEC\ 9899:1999 standard requires the \fIabort\fP() function
to be async-signal-safe. Since
IEEE\ Std\ 1003.1-2001 defers to the ISO\ C standard, this required
a change to the DESCRIPTION from ``shall include
the effect of \fIfclose\fP()'' to ``may include an attempt to effect
\fIfclose\fP().''
.LP
The revised wording permits some backwards-compatibility and avoids
a potential deadlock situation.
.LP
The Open Group Base Resolution bwg2002-003 is applied, removing the
following XSI shaded paragraph from the DESCRIPTION:
.LP
``On XSI-conformant systems, in addition the abnormal termination
processing shall include the effect of \fIfclose\fP() on message catalog
descriptors.''
.LP
There were several reasons to remove this paragraph:
.IP " *" 3
No special processing of open message catalogs needs to be performed
prior to abnormal process termination.
.LP
.IP " *" 3
The main reason to specifically mention that \fIabort\fP() includes
the effect of \fIfclose\fP() on open streams is to flush output queued
on the stream. Message catalogs in this
context are read-only and, therefore, do not need to be flushed.
.LP
.IP " *" 3
The effect of \fIfclose\fP() on a message catalog descriptor is unspecified.
Message
catalog descriptors are allowed, but not required to be implemented
using a file descriptor, but there is no mention in
IEEE\ Std\ 1003.1-2001 of a message catalog descriptor using a standard
I/O stream FILE object as would be expected by \fIfclose\fP().
.LP
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fIexit\fP(), \fIkill\fP(), \fIraise\fP(), \fIsignal\fP(), \fIwait\fP(),
\fIwaitpid\fP(), the
Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<stdlib.h>\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.