You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/exit-exit-exit.md
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ void _exit(
87
87
## Remarks
88
88
The `exit`, `_Exit` and `_exit` functions terminate the calling process. The `exit` function calls destructors for thread-local objects, then calls—in last-in-first-out (LIFO) order—the functions that are registered by `atexit` and `_onexit`, and then flushes all file buffers before it terminates the process. The `_Exit` and `_exit` functions terminate the process without destroying thread-local objects or processing `atexit` or `_onexit` functions, and without flushing stream buffers.
89
89
90
-
Although the `exit`, `_Exit` and `_exit` calls do not return a value, the low-order byte of`status` is made available to the host environment or waiting calling process, if one exists, after the process exits. Typically, the caller sets the `status` value to 0 to indicate a normal exit, or to some other value to indicate an error. The `status` value is available to the operating-system batch command `ERRORLEVEL` and is represented by one of two constants: `EXIT_SUCCESS`, which represents a value of 0, or `EXIT_FAILURE`, which represents a value of 1.
90
+
Although the `exit`, `_Exit` and `_exit` calls do not return a value, the value in`status` is made available to the host environment or waiting calling process, if one exists, after the process exits. Typically, the caller sets the `status` value to 0 to indicate a normal exit, or to some other value to indicate an error. The `status` value is available to the operating-system batch command `ERRORLEVEL` and is represented by one of two constants: `EXIT_SUCCESS`, which represents a value of 0, or `EXIT_FAILURE`, which represents a value of 1.
91
91
92
92
The `exit`, `_Exit`, `_exit`, `quick_exit`, `_cexit`, and `_c_exit` functions behave as follows.
93
93
@@ -100,13 +100,18 @@ void _exit(
100
100
|`_cexit`|Performs complete C library termination procedures and returns to the caller. Does not terminate the process.|
101
101
|`_c_exit`|Performs minimal C library termination procedures and returns to the caller. Does not terminate the process.|
102
102
103
-
When you call the `exit`, `_Exit` or `_exit` function, the destructors for any temporary or automatic objects that exist at the time of the call are not called. An automatic object is defined in a function where the object is not declared to be static. A temporary object is an object that's created by the compiler. To destroy an automatic object before you call `exit`, `_Exit`, or `_exit`, explicitly call the destructor for the object, as follows:
103
+
When you call the `exit`, `_Exit` or `_exit` function, the destructors for any temporary or automatic objects that exist at the time of the call are not called. An automatic object is a non-static local object defined in a function. A temporary object is an object that's created by the compiler, such as a value returned by a function call. To destroy an automatic object before you call `exit`, `_Exit`, or `_exit`, explicitly call the destructor for the object, as shown here:
0 commit comments