OSDN Git Service

ebe720ab76babb9d08f19f132d9b19a63914ad0b
[linuxjm/LDP_man-pages.git] / original / man3 / abort.3
1 .\" Copyright 2007 (C) Michael Kerrisk <mtk.manpages@gmail.com>
2 .\" some parts Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .\" References consulted:
27 .\"     Linux libc source code
28 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
29 .\"     386BSD man pages
30 .\" Modified Sat Jul 24 21:46:21 1993 by Rik Faith (faith@cs.unc.edu)
31 .\" Modified Fri Aug  4 10:51:53 2000 - patch from Joseph S. Myers
32 .\" 2007-12-15, mtk, Mostly rewritten
33 .\"
34 .TH ABORT 3  2014-03-25 "GNU" "Linux Programmer's Manual"
35 .SH NAME
36 abort \- cause abnormal process termination
37 .SH SYNOPSIS
38 .nf
39 .B #include <stdlib.h>
40 .sp
41 .B void abort(void);
42 .fi
43 .SH DESCRIPTION
44 The
45 .BR abort ()
46 first unblocks the
47 .B SIGABRT
48 signal, and then raises that signal for the calling process.
49 This results in the abnormal termination of the process unless the
50 .B SIGABRT
51 signal is caught and the signal handler does not return
52 (see
53 .BR longjmp (3)).
54 .PP
55 If the
56 .BR abort ()
57 function causes process termination,
58 all open streams are closed and flushed.
59 .PP
60 If the
61 .B SIGABRT
62 signal is ignored, or caught by a handler that returns, the
63 .BR abort ()
64 function will still terminate the process.
65 It does this by restoring the default disposition for
66 .B SIGABRT
67 and then raising the signal for a second time.
68 .SH RETURN VALUE
69 The
70 .BR abort ()
71 function never returns.
72 .SH ATTRIBUTES
73 .SS Multithreading (see pthreads(7))
74 The
75 .BR abort ()
76 function is thread-safe.
77 .SH CONFORMING TO
78 SVr4, POSIX.1-2001, 4.3BSD, C89, C99.
79 .SH SEE ALSO
80 .BR gdb (1),
81 .BR sigaction (2),
82 .BR exit (3),
83 .BR longjmp (3),
84 .BR raise (3)
85 .SH COLOPHON
86 This page is part of release 3.67 of the Linux
87 .I man-pages
88 project.
89 A description of the project,
90 information about reporting bugs,
91 and the latest version of this page,
92 can be found at
93 \%http://www.kernel.org/doc/man\-pages/.