Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
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
Date: Wed, 11 May 2005 22:57:29 -0400
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Fixing strace and cygcheck so that they work with mount -X
Message-ID: <20050512025729.GB25511@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
References: <20050509022611.GA7850@trixie.casa.cgf.cx> <427F9C41.1000605@acm.org> <427FB7B2.8040903@mscha.nl> <20050510151746.GV15665@trixie.casa.cgf.cx> <42822503.2090903@mscha.org> <20050511154036.GD10119@trixie.casa.cgf.cx> <20050511165354.GA15412@trixie.casa.cgf.cx> <428255DA.4030907@acm.org> <42828A27.5050206@mscha.org> <42829A20.2030209@acm.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <42829A20.2030209@acm.org>
User-Agent: Mutt/1.5.8i

On Wed, May 11, 2005 at 04:49:52PM -0700, David Rothenberger wrote:
>On 5/11/2005 3:41 PM, Michael Schaap wrote:
>>The patch as-is doesn't compile for me, though, I presume because
>>    char **envp = (char **) cygwin_internal (CW_ENVP);
>>uses a not-yet-released Cygwin enhancement.  But when I change it to the
>>simpler and more standard
>>    char **envp = environ;
>>it compiles and works fine, both under mount -X and normally.
>
>Doh! I didn't read Chris' last comment carefully enough. Yes, copying 
>from environ is much more reasonable.
>
>>(At first I was a bit suspicious of the logic - it only sets those
>>Windows variables that are not currently set, so what about variables
>>that were changed or deleted within Cygwin? - but it looks like the
>>Windows environment isn't the standard pre-Cygwin user environment, but
>>a minimal one with only PATH and SYSTEMROOT set, so it actually does
>>behave optimally this way - it sets all other variables when running
>>under mount -X, and sets nothing otherwise.)
>
>Right. The main reason I did that, though, was because copying the 
>Cygwin PATH to the Windows environment caused lots of core dumps.

You're going to have to convert the PATH to windows form before adding
it to the environment.

cgf

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

