From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 082674696C3 for ; Mon, 2 Mar 2020 23:12:54 +0300 (MSK) Received: by mail-lf1-f67.google.com with SMTP id w22so638141lfk.5 for ; Mon, 02 Mar 2020 12:12:54 -0800 (PST) From: Cyrill Gorcunov Date: Mon, 2 Mar 2020 23:12:22 +0300 Message-Id: <20200302201227.31785-3-gorcunov@gmail.com> In-Reply-To: <20200302201227.31785-1-gorcunov@gmail.com> References: <20200302201227.31785-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 2/7] popen: allow accessing environ variable List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml This is part of posix standart. Signed-off-by: Cyrill Gorcunov --- src/lib/core/popen.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/lib/core/popen.c b/src/lib/core/popen.c index 1cfe58ee0..0e2d9dd00 100644 --- a/src/lib/core/popen.c +++ b/src/lib/core/popen.c @@ -591,9 +591,7 @@ close_inherited_fds(int *skip_fds, size_t nr_skip_fds) return 0; } -#ifdef TARGET_OS_LINUX extern char **environ; -#endif /** * Get pointer to environment variables to use in @@ -603,17 +601,8 @@ static inline char ** get_envp(struct popen_opts *opts) { if (!opts->env) { -#ifdef TARGET_OS_LINUX /* Inherit existing ones if not specified */ return environ; -#else - static const char **empty_envp[] = { NULL }; - static bool said = false; - if (!said) - say_warn("popen: Environment inheritance " - "unsupported, passing empty"); - return (char **)empty_envp; -#endif } return opts->env; } -- 2.20.1