putenv does not put env into win32?

Mumit Khan khan@xraylith.wisc.EDU
Wed Apr 28 10:04:00 GMT 1999


Eugene Kanter <eugene@bgs.com> writes:
> 
> I guess cygwin putenv() MUST call SetEnvironmentVariable() at the end. I
> see no excuses for that.

Chris/Geoffrey/DJ can comment on the reason, but I'd guess it's mostly a
performance related issue.

> Just for test, I tried to call just SetEnvironmentVariable() and it does
> not update cygwin variable. Are there the different sets of variables?

Cygwin caches the environment variables at startup by calling
GetEnvironmentStrings and then uses its local copies. Performance
again. Using cygwin_conv_* routines are rather heavy-weight.

Perhaps there is a set of env variables, such as PATH, that should always 
be kept in sync at the expense of a little performance loss? 

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list