From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-1.1 required=3.0 tests=AWL,BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: unicorn-public@bogomips.org Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 7ACBB633836 for ; Fri, 26 Jun 2015 23:39:10 +0000 (UTC) Received: by oiax193 with SMTP id x193so85752836oia.2 for ; Fri, 26 Jun 2015 16:39:10 -0700 (PDT) X-Received: by 10.182.153.161 with SMTP id vh1mr449116obb.34.1435361949916; Fri, 26 Jun 2015 16:39:09 -0700 (PDT) MIME-Version: 1.0 Sender: brauliobo@gmail.com Received: by 10.202.87.76 with HTTP; Fri, 26 Jun 2015 16:38:30 -0700 (PDT) In-Reply-To: <20150626231412.GB10361@dcvr.yhbt.net> References: <20150626223135.GA9040@dcvr.yhbt.net> <20150626231412.GB10361@dcvr.yhbt.net> From: =?UTF-8?Q?Br=C3=A1ulio_Bhavamitra?= Date: Fri, 26 Jun 2015 20:38:30 -0300 X-Google-Sender-Auth: gSTjeVLKtowa9rUjNsrXibAJwvY Message-ID: Subject: Re: Does the the environment is preserved on USR2? To: Eric Wong Cc: unicorn-public Content-Type: text/plain; charset=UTF-8 List-Id: On Fri, Jun 26, 2015 at 8:14 PM, Eric Wong wrote: > Eric Wong wrote: >> USR2 should not change environment variables besides UNICORN_FD >> and PWD (if working_directory is used). >> >> On most Linux versions, you can check the initial environment of a >> running process by inspecting the environ file for the process: >> >> tr '\0' '\n' < /proc/$PID/environ >> >> This may not reflect environment changes after the process is started. > > Actually, I noticed this doesn't even reflect ENV changes on > fork from Ruby (but system("env") displays the correct result > from a forked process) using Linux 4.0.6 > >> However, you can use ENV inside Ruby code to check that. Maybe add a >> private Rack endpoint to show ENV.inspect output to your app to check >> this... > > So use ENV from Ruby instead :) Thanks Eric, will try this!