function
<cstdlib>
quick_exit_Noreturn void quick_exit (int status);
[[noreturn]] void quick_exit (int status) noexcept;
Terminate calling process quick
Terminates the process normally by returning control to the host environment after calling all functions registered using at_quick_exit.No additional cleanup tasks are performed: No object destructors are called. Although whether C streams are closed and/or flushed, and files open with tmpfile are removed depends on the particular system or library implementation.
If status is zero or EXIT_SUCCESS, a successful termination status is returned to the host environment.
If a program calls both exit and quick_exit, or quick_exit more than once, it causes undefined behavior.
0
or EXIT_SUCCESS, it indicates success.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* quick_exit example */
#include <stdio.h> /* puts */
#include <stdlib.h> /* at_quick_exit, quick_exit, EXIT_SUCCESS */
void fnQExit (void)
{
puts ("Quick exit function.");
}
int main ()
{
at_quick_exit (fnQExit);
puts ("Main function: Beginning");
quick_exit (EXIT_SUCCESS);
puts ("Main function: End"); // never executed
return 0;
}
Main function: Beginning Quick exit function.
If any of the functions registered with at_quick_exit throws an exception, terminate is automatically called.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4