[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cleansing the environment automatically
From: |
Eli Zaretskii |
Subject: |
Re: Cleansing the environment automatically |
Date: |
Sat, 19 Jan 2008 11:14:36 +0200 |
> Date: Sat, 19 Jan 2008 04:26:49 +0000
> From: Greg Chicares <address@hidden>
> Cc: David Wuertele <address@hidden>, address@hidden
>
> On 2008-01-19 03:17Z, Paul Smith wrote:
> > On Sat, 2008-01-19 at 01:09 +0000, David Wuertele wrote:
> >> I always try to create a more strict configuration hygiene by
> >> cleansing the environment using "env -i" at the beginning of each
> >> command.
> [...]
> > unexport $(.VARIABLES)
>
> I tried that with this testcase, using a msw binary I'd built
> myself from FSF make-3.81 sources, and got a segfault:
>
> C:/tmp[0]$cat env_i.make
> unexport $(.VARIABLES)
>
> all:
> @echo xyzzy is $$xyzzy
> C:/tmp[0]$make -f env_i.make
> \usr\bin\make.EXE: Interrupt/Exception caught (code = 0xc0000005, addr =
> 0x419fc0)
I see this on Windows as well, but on GNU/Linux the above testcase
does not cause a crash. I will try to look into this, but please note
that on Windows it is AFAIK futile to remove everything from the
environment because when Windows invokes a program, it always pushes
into its environment the standard variables and variables defined in
the system and user's profiles.