X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Tue, 17 Jun 2008 21:05:36 -0400
From: Mike Mueller <mike@subfocal.net>
To: cygwin@cygwin.com
Subject: Re: Cygwin app not receiving modified PATH env var
Message-ID: <20080618010536.GE7632@samus.subfocal.net>
References: <20080617034152.GD7632@samus.subfocal.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20080617034152.GD7632@samus.subfocal.net>
User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Mon, Jun 16, 2008 at 11:41:52PM -0400, Mike Mueller wrote:
> I have a program (native win32) that is capable of launching
> sub-processes, using apr (apache portable runtime), which is essentially
> a wrapper around CreateProcess in the Windows API.  My program creates a
> modified environment (changes the PATH env var), and passes this new
> environment to CreateProcess.
> 
> When I run a native Windows program, for example, a .bat script that
> says "echo %PATH%", I see the correctly modified PATH env var.
> 
> When I run a Cygwin program, the PATH is the original unmodified path
> (rephrased in cygwin format), maybe inherited from the parent process?
> The modified PATH being passed to CreateProcess is not discovered by the
> Cygwin app.
> 
> I would've expected the two to behave the same in this situation.  Has
> anyone done anything like this before?  Is there a known issue here, or
> is this a new bug?  Workarounds?

No thoughts on this?  How & when does Cygwin take a snapshot of the
Windows environment?  I'm still trying to figure out how my modified
environment is not being picked up...

Mike

--
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/

