X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; q=dns; s=default; b=jUvLO3RK51PZFhOlMiL0BUFSiyYa znHMxNyZxmNVxxU1Rtw1IX/aG35DzQGt9j612q+ugLIExIX8kTKGtd/FPUc+MIAy QWZhSKLNFvWqQQ+AjW17QzkDLgrN447GKaIe4PwC9ON1U97CCCxDfV3qqSRqwBFu /mOV2OL2fZMS33s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; s=default; bh=+FwpVlIHVW4zNs4iq5coEENBcVw=; b=iq Yq2GiCv8XLXDGC2slorta6aGwomN6YGN7jDOoKM/mpQ9+vKSfkITOLV90buQYMUv FDyLb5MmdI5e3dILOU7oHSCy4YJ0e8JRSS5+wBJwD5fh438vP5jyJyDDP4Q2dTD7 ZbfJQf97iQPHF5EwvN2mPExRm+0O5UEcaRjZTIcRM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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 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 12:11:10 -0600 Message-Id: <5254219C-D6EF-47E7-BE79-3EEDC8DA6604@solidrocksystems.com> References: <20160908120718 DOT GE3860 AT calimero DOT vinschen DOT 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 AT solidrocksystems DOT com X-Email-Count: 2 X-Source-Cap: c29saWRycjI7c29saWRycjI7Ym94ODY3LmJsdWVob3N0LmNvbQ== X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id uAHIBmWG016422 > On Nov 17, 2016, at 12:04 PM, Francis Litterio wrote: > > On 9/8/2016 8:07 AM, Corinna Vinschen wrote: >> On Sep 5 10:36, Doug Henderson wrote: > >>> I set CYGWIN_NOWINPATH=1 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. >> >> 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. > > Yes, but Explorer induces confusion as follows (seen on Windows 7): > > 1. Open a Command Prompt from the Start Menu (so cmd.exe is a child of explorer.exe), and enter "echo %foobar%". See output "%foobar%". Environment variable foobar is not set. > > 2. Enter "setx foobar 99" to add foobar to the persistent environment variables in the Registry. > > 3. Enter "echo %foobar%" again in the same Command Prompt. Still see "%foobar%". No change in that process's environment, as expected. > > 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. > > This leads people to think that environment variables stored in the Registry 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 process 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