From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id F38BE1F462 for ; Mon, 27 May 2019 21:14:19 +0000 (UTC) Received: from localhost ([127.0.0.1]:50984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVMwk-0002pt-GY for normalperson@yhbt.net; Mon, 27 May 2019 17:14:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVMwb-0002mV-4Y for bug-gnulib@gnu.org; Mon, 27 May 2019 17:14:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVMwY-0008BC-2n for bug-gnulib@gnu.org; Mon, 27 May 2019 17:14:09 -0400 Received: from mo6-p01-ob.smtp.rzone.de ([2a01:238:20a:202:5301::10]:14655) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVMwX-00088v-Dd for bug-gnulib@gnu.org; Mon, 27 May 2019 17:14:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1558991641; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=JiJI6kcls+rAxgNtFKk++PFFoTssGMwpTHRa+dgIrXM=; b=MOWLgJ5ZZmjtv5EIEnC7wcNpnlBAyLEYbADG8hp2pcLsKbJL4Jb3WbCgnYhVSf48yh B2X85kJPMjSlNQ4DkIAa/sxcjV4pKvR41nhZ9K+w9rudKmldWcZsQ1PgfJxc7/hpeMt0 ytUVYTAQn9hG1+jQT15gDEhO05Pkdpr9Wzbz23E+RyaAQkpHxbAWd69xYvQf2CJcMuYX sRuEBRUVAt4tw+Vqn1B4YDIRxMd+JowJOm+fyJf3SOJhejmfPrwZEp/PMNZvEhNRYvFS dP8HE19zAyQlUc0kCMgDTTqsWTxQ5D/5Qqo/1f2uxbRkKMPTfYsbv1jewyMjDeSa3Qwt GVXw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0y5RW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.18 DYNA|AUTH) with ESMTPSA id m03afev4RLDd5A8 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Mon, 27 May 2019 23:13:39 +0200 (CEST) From: Bruno Haible To: Florian Weimer Subject: Re: Why does close_stdout close stdout and stderr? Date: Mon, 27 May 2019 23:13:38 +0200 Message-ID: <17922621.zVK5DCHt84@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <875zpwjedz.fsf@oldenburg2.str.redhat.com> References: <87muk8d295.fsf@oldenburg2.str.redhat.com> <1981329.u6ql5j3YLz@omega> <875zpwjedz.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5301::10 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamil Dudka , Paul Eggert , bug-gnulib@gnu.org, Jeff Layton , Bernhard Voelker , NeilBrown , Eric Blake Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Florian Weimer wrote: > What's so bad about closing the underyling file descriptor after > duplicating it? See my other mail: > 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