Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
1
1
[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
bgColor#ccccff
langc
#include <stdlib.h>
/* ... */

if (/* Something really bad happened */) {
  _Exit(EXIT_FAILURE);
}

...

Anchor
2
2
[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

[IEEE Std 1003.1:2013]XSH, System Interfaces, exit
[ISO/IEC 9899:2011]Subclause 5.1.2.2.3, "Program Termination"
Subclause 7.22.4, "Communication with the Environment"

...