delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/19/10:29:11

X-Spam-Check-By: sourceware.org
Date: Thu, 19 Jan 2006 09:29:27 -0600
From: Brian Ford <Brian DOT Ford AT flightsafety DOT com>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: problen with run command and the environment
In-Reply-To: <20060119000230.30295.qmail@web35612.mail.mud.yahoo.com>
Message-ID: <Pine.CYG.4.58.0601190907200.468@PC1163-8460-XP.flightsafety.com>
References: <20060119000230 DOT 30295 DOT qmail AT web35612 DOT mail DOT mud DOT yahoo DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Wed, 18 Jan 2006, Jeff Hardy wrote:

> I have updated my windowsxp with the latest cygwin and
> this breaks several scripts I have that use the run
> command to start xterms without consoles. I have tried
> to track the problem down and at least one problem is
> that if I type "run env > /tmp/xxx" and look at
> /tmp/xxx, most of my environment variables are
> missing. Also, my HOME environment variable is now "/"
> instead of what my home directory is. I have another
> computer that I have not updated yet and when I do the
> same exercise as above, all the environment variables
> come across the run command.
>
> Anybody have any suggestions?

Just a few comments.

Run uses the Windows CreateProcess call to hide the console and
launch a new process, thereby subverting Cygwin in a manner similar to
one of our applications that I mentioned here:

http://cygwin.com/ml/cygwin/2006-01/msg00472.html

It passes a NULL for the lpEnvironment parameter of that call which
means to inherit the environment from the parent process.  In Cygwin <=
1.5.18, this inheritance included Cygwin environment variables.  Now it
does not.  I presume it now only inherits what was in the Windows
environment?

Anyway, this is a regression, but not necessarily one that will be fixed,
especially given Igor's workaround.  I suspect this is just a case of if
you subvert Cygwin's means of doing something using Windows native calls,
you can expect the subversion method to break occasionally :-(.

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019