function
<cstdlib>
_Exit[[noreturn]] void _Exit (int status) noexcept;
Terminate calling process
Terminates the process normally by returning control to the host environment, but without performing any of the regular cleanup tasks for terminating processes (as function exit does).No object destructors, nor functions registered by atexit or at_quick_exit are called.
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.
0
or EXIT_SUCCESS, it indicates success.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* _Exit example */
#include <stdio.h> /* printf, fopen */
#include <stdlib.h> /* _Exit, EXIT_FAILURE */
int main ()
{
FILE * pFile;
pFile = fopen ("myfile.txt","r");
if (pFile==NULL)
{
printf ("Error opening file");
_Exit (EXIT_FAILURE);
}
else
{
/* file operations here */
}
return 0;
}
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