1<html lang="en"> 2<head> 3<title>abort - Untitled</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Untitled"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Stdlib.html#Stdlib" title="Stdlib"> 9<link rel="prev" href="a64l.html#a64l" title="a64l"> 10<link rel="next" href="abs.html#abs" title="abs"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<meta http-equiv="Content-Style-Type" content="text/css"> 13<style type="text/css"><!-- 14 pre.display { font-family:inherit } 15 pre.format { font-family:inherit } 16 pre.smalldisplay { font-family:inherit; font-size:smaller } 17 pre.smallformat { font-family:inherit; font-size:smaller } 18 pre.smallexample { font-size:smaller } 19 pre.smalllisp { font-size:smaller } 20 span.sc { font-variant:small-caps } 21 span.roman { font-family:serif; font-weight:normal; } 22 span.sansserif { font-family:sans-serif; font-weight:normal; } 23--></style> 24<link rel="stylesheet" type="text/css" href="../cs.css"> 25</head> 26<body> 27<div class="node"> 28<a name="abort"></a> 29<p> 30Next: <a rel="next" accesskey="n" href="abs.html#abs">abs</a>, 31Previous: <a rel="previous" accesskey="p" href="a64l.html#a64l">a64l</a>, 32Up: <a rel="up" accesskey="u" href="Stdlib.html#Stdlib">Stdlib</a> 33<hr> 34</div> 35 36<h3 class="section">2.3 <code>abort</code>—abnormal termination of a program</h3> 37 38<p><a name="index-abort-4"></a><strong>Synopsis</strong> 39<pre class="example"> #include <stdlib.h> 40 void abort(void); 41 42</pre> 43 <p><strong>Description</strong><br> 44Use <code>abort</code> to signal that your program has detected a condition it 45cannot deal with. Normally, <code>abort</code> ends your program's execution. 46 47 <p>Before terminating your program, <code>abort</code> raises the exception <code>SIGABRT</code> 48(using `<code>raise(SIGABRT)</code>'). If you have used <code>signal</code> to register 49an exception handler for this condition, that handler has the 50opportunity to retain control, thereby avoiding program termination. 51 52 <p>In this implementation, <code>abort</code> does not perform any stream- or 53file-related cleanup (the host environment may do so; if not, you can 54arrange for your program to do its own cleanup with a <code>SIGABRT</code> 55exception handler). 56 57 <p><br> 58<strong>Returns</strong><br> 59<code>abort</code> does not return to its caller. 60 61 <p><br> 62<strong>Portability</strong><br> 63ANSI C requires <code>abort</code>. 64 65 <p>Supporting OS subroutines required: <code>_exit</code> and optionally, <code>write</code>. 66 67 <p><br> 68 69 </body></html> 70 71