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