A fairly significant rewrite to clarify operation of abort().

This commit is contained in:
Michael Kerrisk 2007-12-06 08:56:29 +00:00
parent e2de12c279
commit db49e93776
2 changed files with 27 additions and 10 deletions

View File

@ -9,6 +9,7 @@ Contributors
The following people contributed notes, ideas, or patches that have
been incorporated in changes in this release:
Alex Tuninga <atuninga@google.com>
Bert Wesarg <bert.wesarg@googlemail.com>
Maxime Vaudequin <maxime.vaudequin@gmail.com>
@ -25,6 +26,10 @@ Typographical or grammatical errors have been corrected in several places.
Changes to individual pages
---------------------------
abort.3
mtk, after a note by Alex Tuninga
A fairly significant rewrite to clarify operation of abort().
argz_add.3
Bert Wesarg / mtk
s/envz/envz_add/ in SEE ALSO.

View File

@ -1,4 +1,5 @@
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\" Copyright 2007 (C) Michael Kerrisk <mtk.manpages@gmail.com>
.\" some parts Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
@ -26,10 +27,11 @@
.\" 386BSD man pages
.\" Modified Sat Jul 24 21:46:21 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Fri Aug 4 10:51:53 2000 - patch from Joseph S. Myers
.\" 2007-12-15, mtk, Mostly rewritten
.\"
.TH ABORT 3 1993-04-12 "GNU" "Linux Programmer's Manual"
.TH ABORT 3 2007-12-15 "GNU" "Linux Programmer's Manual"
.SH NAME
abort \- cause abnormal program termination
abort \- cause abnormal process termination
.SH SYNOPSIS
.nf
.B #include <stdlib.h>
@ -39,20 +41,28 @@ abort \- cause abnormal program termination
.SH DESCRIPTION
The
.BR abort ()
function causes abnormal program termination unless
the signal
first unblocks the
.B SIGABRT
is caught and the signal handler does not return.
signal, and then raises that signal for the calling process.
This results in the abnormal termination of the process unless the
.B SIGABRT
signal is caught and the signal handler does not return
(see
.BR longjmp (3)).
.PP
If the
.BR abort ()
function causes program termination, all open
streams are closed and flushed.
function causes process termination,
all open streams are closed and flushed.
.PP
If the
.B SIGABRT
signal is blocked or ignored, the
signal is ignored, or caught by a handler that returns, the
.BR abort ()
function will still override it.
function will still terminate the process.
It does this by restoring the default disposition for
.B SIGABRT
and then raising the signal for a second time.
.SH "RETURN VALUE"
The
.BR abort ()
@ -60,6 +70,8 @@ function never returns.
.SH "CONFORMING TO"
SVr4, POSIX.1-2001, 4.3BSD, C89, C99
.SH "SEE ALSO"
.BR gdb (1),
.BR sigaction (2),
.BR exit (3),
.BR longjmp (3),
.BR raise (3)