From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by dpdk.org (Postfix) with ESMTP id 14FC437B4 for ; Wed, 12 Oct 2016 21:47:34 +0200 (CEST) Received: by mail-lf0-f54.google.com with SMTP id x79so94680453lff.0 for ; Wed, 12 Oct 2016 12:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=6NlppIaLU6AWtEmWZW09NZv2eQzmpUMblaizljBAFzg=; b=FbgA0NQNvgkjql1vP7p5O25nM2mtVum8Soc5VOx93CHoJRuseGWlG7cbiFZ5QzDqIR uIkkRHlQrGdhvmgFwOduK35cx6wU6rVefjRheU+qr3GcmI47cAKkbjSuJ9NdMwtDxhes N2xNXln92g12vVe3ncdrYSKxCEvdyHfeFAnLHWf0hkl1c4hDr1ff1JqMoctLVbOF4j7w LywxN6oO59jpiwQBosmXkwVThlWiB60em7wDNRAT+X8t3NMNDnjlQ2qbZzWiG5z44gSg aSjziW2B2iU0AaBofAdA9UEYBxM8BYZi8fuz9fxdOrnd0b4GYJwItUOZLK2SYHVO5J+v t58w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=6NlppIaLU6AWtEmWZW09NZv2eQzmpUMblaizljBAFzg=; b=mlLDI6wT2uHz5H+5sJoCGWlI+YPnmc76W89NcJjws6tXWpd7fIHPn1DNjS7E+txEv9 gd1EmiiH8QRXfwaWTPufvzDNerwz7+5ANFH7gK+AKe/E9WdRpyDKXgfuLjqIYfDGne4c zmTwECAaCEx53wdJgk2KfIi/S/Ajp7CBbnchjc+Stv90qUkbFIV9cq9Z5KxU3UcN9Gph ZO8GldKAAgcx68r+YRWSzTlnvrl+EzfG1vtw+ZWKes8+LO0LooOMR6MYhmm9Sek/eTY+ bNCPqM9n1l2kz+4V6n6X7FaFxWFIzhQAKnUaKseAzLBoBgIRhqoYCQkRI8eNKnqh5Ey6 cG3w== X-Gm-Message-State: AA6/9Rm2QE51245qP9HjpMFjOqt4WyrPLtCt8ev+rll1PcpCI3G7o25iybRVIunu27863c7u X-Received: by 10.194.55.41 with SMTP id o9mr3834678wjp.228.1476301653710; Wed, 12 Oct 2016 12:47:33 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id 17sm15497601wju.44.2016.10.12.12.47.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Oct 2016 12:47:32 -0700 (PDT) From: Thomas Monjalon To: John Ousterhout Cc: dev@dpdk.org Date: Wed, 12 Oct 2016 21:47:32 +0200 Message-ID: <2906824.LEp5vtMuTD@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20161012193832.5016-1-ouster@cs.stanford.edu> References: <20160928204244.8288-1-ouster@cs.stanford.edu> <20161012193832.5016-1-ouster@cs.stanford.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4] log: respect rte_openlog_stream calls before rte_eal_init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 19:47:34 -0000 2016-10-12 12:38, John Ousterhout: > @@ -127,6 +125,19 @@ rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap) > { > int ret; > FILE *f = rte_logs.file; > + if (f == NULL) { > + f = default_log_stream; > + if (f == NULL) { > + /* > + * Grab the current value of stderr here, rather than > + * just initializing default_log_stream to stderr. This > + * ensures that we will always use the current value > + * of stderr, even if the application closes and > + * reopens it. > + */ > + f = stderr; > + } > + } I don't understand this big comment. What is the difference with initializing default_log_stream to stderr? What do you mean by "if the application closes and reopens it"?