Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/utility/program/quick exit"

From cppreference.com
< cpp‎ | utility‎ | program
m (Text replace - "{{mark c++0x feature}}" to "{{mark c++11 feature}}")
Line 1: Line 1:
 
{{cpp/title| quick_exit}}
 
{{cpp/title| quick_exit}}
 
{{cpp/utility/program/sidebar}}
 
{{cpp/utility/program/sidebar}}
{{ddcl | header=cstdlib | notes={{mark c++0x feature}} |
+
{{ddcl | header=cstdlib | notes={{mark c++11 feature}} |
 
void quick_exit( int exit_code );
 
void quick_exit( int exit_code );
 
}}
 
}}

Revision as of 12:51, 2 August 2011

Template:cpp/utility/program/sidebar

Defined in header <cstdlib>
void quick_exit( int exit_code );
Template:mark c++11 feature

Causes normal program termination to occur without completely cleaning the resources.

Functions passed to at_quick_exit() are called. If an exception tries to propagate out of any of the function, terminate() is called.

Destructors of variables with automatic, thread local and static storage durations are not called. Whether open resources such as files are closed is implementation defined. If exit_code is EXIT_FAILURE, an implementation-defined status, indicating unsuccessful termination is returned. In other cases implementation-defined status value is returned.

Template:params

exit_code - exit status of the program

Template:returns Template:return none

Template:example cpp

Template:see also

causes abnormal program termination (without cleaning up)
(function) [edit]
registers a function to be called on std::exit() invocation
(function) [edit]
registers a function to be called on std::quick_exit invocation
(function) [edit]