xref: /minix3/lib/libc/stdlib/quick_exit.3 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc.\"	$NetBSD: quick_exit.3,v 1.3 2015/07/26 17:03:06 christos Exp $
284d9c625SLionel Sambuc.\"  Copyright (c) 2011 David Chisnall
384d9c625SLionel Sambuc.\"  All rights reserved.
484d9c625SLionel Sambuc.\"
584d9c625SLionel Sambuc.\"  Redistribution and use in source and binary forms, with or without
684d9c625SLionel Sambuc.\"  modification, are permitted provided that the following conditions
784d9c625SLionel Sambuc.\"  are met:
884d9c625SLionel Sambuc.\"  1. Redistributions of source code must retain the above copyright
984d9c625SLionel Sambuc.\"     notice, this list of conditions and the following disclaimer.
1084d9c625SLionel Sambuc.\"  2. Redistributions in binary form must reproduce the above copyright
1184d9c625SLionel Sambuc.\"     notice, this list of conditions and the following disclaimer in the
1284d9c625SLionel Sambuc.\"     documentation and/or other materials provided with the distribution.
1384d9c625SLionel Sambuc.\"
1484d9c625SLionel Sambuc.\"  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1584d9c625SLionel Sambuc.\"  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1684d9c625SLionel Sambuc.\"  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1784d9c625SLionel Sambuc.\"  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1884d9c625SLionel Sambuc.\"  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1984d9c625SLionel Sambuc.\"  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2084d9c625SLionel Sambuc.\"  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2184d9c625SLionel Sambuc.\"  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2284d9c625SLionel Sambuc.\"  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2384d9c625SLionel Sambuc.\"  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2484d9c625SLionel Sambuc.\"  SUCH DAMAGE.
2584d9c625SLionel Sambuc.\"
2684d9c625SLionel Sambuc.\"  $FreeBSD: src/lib/libc/stdlib/quick_exit.3,v 1.4 2012/11/17 01:49:41 svnexp Exp $
2784d9c625SLionel Sambuc.\"
28*0a6a1f1dSLionel Sambuc.Dd July 26, 2015
2984d9c625SLionel Sambuc.Dt QUICK_EXIT 3
3084d9c625SLionel Sambuc.Os
3184d9c625SLionel Sambuc.Sh NAME
3284d9c625SLionel Sambuc.Nm quick_exit
3384d9c625SLionel Sambuc.Nd exits a program quickly, running minimal cleanup
3484d9c625SLionel Sambuc.Sh LIBRARY
3584d9c625SLionel Sambuc.Lb libc
3684d9c625SLionel Sambuc.Sh SYNOPSIS
3784d9c625SLionel Sambuc.In stdlib.h
3884d9c625SLionel Sambuc.Ft _Noreturn void
39*0a6a1f1dSLionel Sambuc.Fn quick_exit "int status"
4084d9c625SLionel Sambuc.Sh DESCRIPTION
4184d9c625SLionel SambucThe
4284d9c625SLionel Sambuc.Fn quick_exit
4384d9c625SLionel Sambucfunction exits the program quickly calling any cleanup functions registered
4484d9c625SLionel Sambucwith
4584d9c625SLionel Sambuc.Xr at_quick_exit 3
4684d9c625SLionel Sambucbut not any C++ destructors or cleanup code registered with
4784d9c625SLionel Sambuc.Xr atexit 3 .
48*0a6a1f1dSLionel Sambuc.Pp
49*0a6a1f1dSLionel SambucThe
50*0a6a1f1dSLionel Sambuc.Fa status
51*0a6a1f1dSLionel Sambucvalues
52*0a6a1f1dSLionel Sambuc.Dv EXIT_SUCCESS
53*0a6a1f1dSLionel Sambucand
54*0a6a1f1dSLionel Sambuc.Dv EXIT_FAILURE
55*0a6a1f1dSLionel Sambuccan be used to indicate successful and unsuccessful
56*0a6a1f1dSLionel Sambuctermination, respectively.
5784d9c625SLionel Sambuc.Sh RETURN VALUES
5884d9c625SLionel SambucThe
5984d9c625SLionel Sambuc.Fn quick_exit
6084d9c625SLionel Sambucfunction does not return.
6184d9c625SLionel Sambuc.Sh SEE ALSO
6284d9c625SLionel Sambuc.Xr at_quick_exit 3 ,
6384d9c625SLionel Sambuc.Xr exit 3
6484d9c625SLionel Sambuc.Sh STANDARDS
6584d9c625SLionel SambucThe
6684d9c625SLionel Sambuc.Fn quick_exit
6784d9c625SLionel Sambucfunction conforms to
6884d9c625SLionel Sambuc.St -isoC-2011 .
69