bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does close_stdout close stdout and stderr?


From: Paul Eggert
Subject: Re: Why does close_stdout close stdout and stderr?
Date: Thu, 9 May 2019 15:17:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]