-/* Close standard output, exiting with status STATUS on failure.
- If a program writes *anything* to stdout, that program should close
- stdout and make sure that the close succeeds. Otherwise, suppose that
- you go to the extreme of checking the return status of every function
- that does an explicit write to stdout. The last printf can succeed in
- writing to the internal stream buffer, and yet the fclose(stdout) could
- still fail (due e.g., to a disk full error) when it tries to write
- out that buffered data. Thus, you would be left with an incomplete
- output file and the offending program would exit successfully.
+ Since close_stdout is commonly registered via 'atexit', POSIX
+ and the C standard both say that it should not call 'exit',
+ because the behavior is undefined if 'exit' is called more than
+ once. So it calls '_exit' instead of 'exit'. If close_stdout
+ is registered via atexit before other functions are registered,
+ the other functions can act before this _exit is invoked.