environment setup problem with "env -"

Igor Pechtchanski pechtcha@cs.nyu.edu
Mon Jan 12 17:53:00 GMT 2004


On Mon, 12 Jan 2004, Joe Buehler wrote:

> It is apparently the case that the Cygwin DLL initializes certain
> environment variables when it starts up.  This breaks the
> functionality of the "env -" command (run a program, discarding
> the entire current environment and using settings specified
> on the command line), which is expecting to be able to strictly
> control the environment of the command it invokes.  I'm not
> sure what the best solution is here...

Hmm, looking at the sources, the only variable I can see being set by the
DLL is CYGWIN (if the "export" option is on).  Some other variables (TMP,
TEMP, TMPDIR, PATH, HOME, and LD_LIBRARY_PATH) are converted to the POSIX
form *if they are present* in the environment.  IIUC, "env -" should clear
the environment completely.  Which variables do you see being set?

FWIW, this could be a problem with the 'env' implementation, rather than
the Cygwin DLL.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton



More information about the Cygwin-developers mailing list