On 5/8/19 11:39 PM, Florian Weimer wrote: > atexit handlers run before ELF destructors (and some C++ destructors). > There can also be multiple such handlers. So it's not true that an > atexit handler always runs last.
OK, but this shouldn't be a problem with any applications currently using close_stdout. At least, none of the applications I know about. I can see the need for a module that does the trick you mention (with suitable error handling) instead of closing stdout, for applications that have nontrivial atexit handlers or destructors. This module's API shouldn't use identifiers like "close_stdout", though, since they wouldn't actually closing stdout.