xref: /netbsd-src/lib/libc/stdlib/quick_exit.3 (revision c0c6a84ba32a9eb338f3229238213b53fb5d9cd2)
1*c0c6a84bSchristos.\"	$NetBSD: quick_exit.3,v 1.3 2015/07/26 17:03:06 christos Exp $
2f5c1f214Schristos.\"  Copyright (c) 2011 David Chisnall
3f5c1f214Schristos.\"  All rights reserved.
4f5c1f214Schristos.\"
5f5c1f214Schristos.\"  Redistribution and use in source and binary forms, with or without
6f5c1f214Schristos.\"  modification, are permitted provided that the following conditions
7f5c1f214Schristos.\"  are met:
8f5c1f214Schristos.\"  1. Redistributions of source code must retain the above copyright
9f5c1f214Schristos.\"     notice, this list of conditions and the following disclaimer.
10f5c1f214Schristos.\"  2. Redistributions in binary form must reproduce the above copyright
11f5c1f214Schristos.\"     notice, this list of conditions and the following disclaimer in the
12f5c1f214Schristos.\"     documentation and/or other materials provided with the distribution.
13f5c1f214Schristos.\"
14f5c1f214Schristos.\"  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15f5c1f214Schristos.\"  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16f5c1f214Schristos.\"  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17f5c1f214Schristos.\"  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18f5c1f214Schristos.\"  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19f5c1f214Schristos.\"  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20f5c1f214Schristos.\"  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21f5c1f214Schristos.\"  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22f5c1f214Schristos.\"  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23f5c1f214Schristos.\"  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24f5c1f214Schristos.\"  SUCH DAMAGE.
25f5c1f214Schristos.\"
26f5c1f214Schristos.\"  $FreeBSD: src/lib/libc/stdlib/quick_exit.3,v 1.4 2012/11/17 01:49:41 svnexp Exp $
27f5c1f214Schristos.\"
28*c0c6a84bSchristos.Dd July 26, 2015
29f5c1f214Schristos.Dt QUICK_EXIT 3
30f5c1f214Schristos.Os
31f5c1f214Schristos.Sh NAME
32f5c1f214Schristos.Nm quick_exit
33f5c1f214Schristos.Nd exits a program quickly, running minimal cleanup
34f5c1f214Schristos.Sh LIBRARY
35f5c1f214Schristos.Lb libc
36f5c1f214Schristos.Sh SYNOPSIS
37f5c1f214Schristos.In stdlib.h
38f5c1f214Schristos.Ft _Noreturn void
39*c0c6a84bSchristos.Fn quick_exit "int status"
40f5c1f214Schristos.Sh DESCRIPTION
41f5c1f214SchristosThe
42f5c1f214Schristos.Fn quick_exit
43f5c1f214Schristosfunction exits the program quickly calling any cleanup functions registered
44f5c1f214Schristoswith
45f5c1f214Schristos.Xr at_quick_exit 3
46f5c1f214Schristosbut not any C++ destructors or cleanup code registered with
47f5c1f214Schristos.Xr atexit 3 .
48*c0c6a84bSchristos.Pp
49*c0c6a84bSchristosThe
50*c0c6a84bSchristos.Fa status
51*c0c6a84bSchristosvalues
52*c0c6a84bSchristos.Dv EXIT_SUCCESS
53*c0c6a84bSchristosand
54*c0c6a84bSchristos.Dv EXIT_FAILURE
55*c0c6a84bSchristoscan be used to indicate successful and unsuccessful
56*c0c6a84bSchristostermination, respectively.
57f5c1f214Schristos.Sh RETURN VALUES
58f5c1f214SchristosThe
59f5c1f214Schristos.Fn quick_exit
60f5c1f214Schristosfunction does not return.
61f5c1f214Schristos.Sh SEE ALSO
62f5c1f214Schristos.Xr at_quick_exit 3 ,
63f5c1f214Schristos.Xr exit 3
64f5c1f214Schristos.Sh STANDARDS
65f5c1f214SchristosThe
66f5c1f214Schristos.Fn quick_exit
67f5c1f214Schristosfunction conforms to
68f5c1f214Schristos.St -isoC-2011 .
69