[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS update: ozone-modules/ozoneDoc



Lars Martin wrote:
> 
> On Wed, 30 May 2001 21:08:48 +0200 (CEST)
> pernyfelt@smb-tec.com wrote:
> 
> > Date: Wednesday May 30, 2001 @ 21:09
> > Author:       pernyfelt
> >
> > Update of /raid/Repository/ozone-modules/ozoneDoc
> > In directory david:/opt/tmp/cvs-serv18104
> >
> > Modified Files:
> >       build.bat
> > Log Message:
> > Set Path to only %JAVA_HOME%\bin and do not include existing
> > classpath in the ant call to fix possible issues with TRAX conflicts
> > ===================================================================
> > File: build.bat               Status: Up-to-date
> >
> >    Working revision:  1.2     Wed May 30 19:08:59 2001
> >    Repository revision:       1.2     /raid/Repository/ozone-modules/ozoneDoc/build.bat,v
> >
> >    Existing Tags:
> >       No Tags Exist
> 
> Hi Per,
> I'm not a Windows user but as far as I know does your patch override
> the PATH environment permanently, i.e. after execution of build.bat
> the PATH only contains %JAVA_HOME%\bin. If you want to ensure that
> your PATH environment is the same as before, you have to use something
> like the following. I'm not sure if this is really correct and
> necessary, but I think so. Per, please test these two different
> behaviours on Windows.
> 
> set HOLDING_PATH=%PATH%
> set PATH=%JAVA_HOME%\bin
> 
> ... starting Ant ...
> 
> set PATH=%HOLDING_PATH%
> set HOLDING_PATH=

This has been bothering me for awhile. I was thinking about environment
variables in UNIX and realized that the shell is the parent process for
the script that calls ant. Unless I'm completely messed up, exporting
env vars changes the vars for only the current process and child
processes. Thus the parent process (ie shell) should not be affected by
the exports. Is this different in a Windows shell or is there just some
misunderstanding?

Example:

#!/bin/sh
export PATH=""
echo path=$PATH

echo $PATH, then run script and then do echo $PATH.

PATH is the same befor and after.

Eric