From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127867 invoked by alias); 17 Nov 2016 18:11:35 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 127797 invoked by uid 89); 17 Nov 2016 18:11:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Francis, francis, Hx-languages-length:1883, flitteriogmailcom X-HELO: gproxy4-pub.mail.unifiedlayer.com Received: from gproxy4-pub.mail.unifiedlayer.com (HELO gproxy4-pub.mail.unifiedlayer.com) (69.89.23.142) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Thu, 17 Nov 2016 18:11:33 +0000 Received: (qmail 756 invoked by uid 0); 17 Nov 2016 18:11:31 -0000 Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy4.mail.unifiedlayer.com with SMTP; 17 Nov 2016 18:11:31 -0000 Received: from box867.bluehost.com ([69.195.124.67]) by cmgw3 with id 96BB1u01g1TMts5016BE6y; Thu, 17 Nov 2016 11:11:16 -0700 X-Authority-Analysis: v=2.1 cv=K/+xQUmI c=1 sm=1 tr=0 a=x/h8IXy5FZdipniTS+KQtQ==:117 a=x/h8IXy5FZdipniTS+KQtQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=L24OOQBejmoA:10 a=pGLkceISAAAA:8 a=Sk2GpK-oueqUxUY07_sA:9 a=CjuIK1q_8ugA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 Received: from rrcs-192-154-176-197.sw.biz.rr.com ([192.154.176.197]:27708 helo=[10.1.84.205]) by box867.bluehost.com with esmtpsa (TLSv1:ECDHE-RSA-AES256-SHA:256) (Exim 4.86_1) (envelope-from ) id 1c7R9T-0007Sb-Nk for cygwin@cygwin.com; Thu, 17 Nov 2016 11:11:11 -0700 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: CYGWIN_NOWINPATH (was Re: /etc/profile: avoid multiple /usr/bin in PATH) From: Vince Rice In-Reply-To: Date: Thu, 17 Nov 2016 19:53:00 -0000 Content-Transfer-Encoding: quoted-printable Message-Id: <5254219C-D6EF-47E7-BE79-3EEDC8DA6604@solidrocksystems.com> References: <20160908120718.GE3860@calimero.vinschen.de> To: The Cygwin Mailing List X-BWhitelist: no X-Exim-ID: 1c7R9T-0007Sb-Nk X-Source-Sender: rrcs-192-154-176-197.sw.biz.rr.com ([10.1.84.205]) [192.154.176.197]:27708 X-Source-Auth: vrice@solidrocksystems.com X-Email-Count: 2 X-Source-Cap: c29saWRycjI7c29saWRycjI7Ym94ODY3LmJsdWVob3N0LmNvbQ== X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00210.txt.bz2 > On Nov 17, 2016, at 12:04 PM, Francis Litterio wrot= e: >=20 > On 9/8/2016 8:07 AM, Corinna Vinschen wrote: >> On Sep 5 10:36, Doug Henderson wrote: >=20 >>> I set CYGWIN_NOWINPATH=3D1 in my user environment variables, i.e. in >>> registry, not in a cmd shell. I expect it needs to be seen when the >>> first cygwin1.dll instance starts, so you would need to stop all >>> cygwin processes and servers, just like you do when you run the cygwin >>> setup, for this to be effective. >>=20 >> Ouch, no! Environment variables are handed down from parent to child >> process. On all systems, be it Windows, Cygwin, Linux or whatever. >> There's *no* other magic involved. It's just a bunch of strings >> inherited from the parent process. >=20 > Yes, but Explorer induces confusion as follows (seen on Windows 7): >=20 > 1. Open a Command Prompt from the Start Menu (so cmd.exe is a child of ex= plorer.exe), and enter "echo %foobar%". See output "%foobar%". Environment= variable foobar is not set. >=20 > 2. Enter "setx foobar 99" to add foobar to the persistent environment var= iables in the Registry. >=20 > 3. Enter "echo %foobar%" again in the same Command Prompt. Still see "%f= oobar%". No change in that process's environment, as expected. >=20 > 4. Launch a new Command Prompt from the Start Menu. Enter "echo %foobar%= ". See "99". Clearly, Explorer updated it's environment from the Registry= and passed the change to the new child process. >=20 > This leads people to think that environment variables stored in the Regis= try are special, when in fact it's Explorer's doing. None of which has anything to do with needing to re-start cygwin, which was= Corinna's point. And, for the record, Explorer doesn't induce any confusion at all. A new pr= ocess gets its environment when it starts. Pretty simple to understand. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple