...
[1] Note that POSIX strengthens the specification for
_Exit()
by prohibiting the function from flushing stream buffers. See the
documentation of the function in
The Open Group Base Specifications Issue 7, IEEE Std 1003.1,
2008 2013 Edition [
IEEE Std 1003.1-2008:2013].
Code Block |
---|
|
#include <stdlib.h>
/* ... */
if (/* Something really bad happened */) {
_Exit(EXIT_FAILURE);
}
|
...
[2] Unlike in the case of
_Exit()
, POSIX explicitly permits but does not require
implementations to flush stream buffers. See the
documentation of the function in
The Open Group Base Specifications Issue 7, IEEE Std 1003.1,
2008 2013 Edition [
IEEE Std 1003.1-2008:2013].
Summary
The following table summarizes the exit behavior of the program termination functions.
...
Related Guidelines
Bibliography
...