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: Bruno Haible
Subject: Re: Why does close_stdout close stdout and stderr?
Date: Mon, 27 May 2019 23:13:38 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; )

Florian Weimer wrote:
> What's so bad about closing the underyling file descriptor after
> duplicating it?

See my other mail:
<https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00134.html>

> It will not have the desired effect on some platforms

Then we will have a regression on these platforms. We don't want regressions.

> It fixes a real problem our users reported on Linux.

Please show the test program and test recipes (with results) that prove that.

> > For the other case, we can introduce, next to the !SANITIZE_ADDRESS test,
> > tests for
> >   getenv ("LD_PRELOAD") != NULL
> >   getenv ("ASAN_OPTIONS") != NULL
> >   getenv ("TSAN_OPTIONS") != NULL
> >   getenv ("MSAN_OPTIONS") != NULL
> >   getenv ("LSAN_OPTIONS") != NULL
> > We can add more such environment variables as needed. getenv() lookups
> > don't make system calls; so they are cheap.
> 
> The application may have called clearenv before that.

The only programs that use clearenv() in a normal Linux distro are init,
systemd, pkexec, php-fpm, and they don't use gnulib. So, no need to worry
about applications that call clearenv().

Bruno




reply via email to

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