environment setup problem with "env -"

Nicholas Wourms nwourms@netscape.net
Tue Jan 13 18:25:00 GMT 2004


> It's a "one thing led to another" situation.
> 1) Windows programs expect those variables.
> 2) They are user dependent and must be changed following a setuid.
> 3) Due to a Windows quirk, some of the computation must be done *before*
>    exec'ing the program following a setuid. That eventually led to
>    generating the stuff on the fly and storing it in the cygheap.
> 4) If they don't exist in the current environment, they are only
>    produced when exec'ing potential Windows programs (see mount -X) 
> Given 1) and the effort made in 4), we can argue forever whether it's
> a bug. An alternative would be to only regenerate these variables
> following a setuid. I vaguely recall doing that at some point.

When they are added to the env, wouldn't it be better to just have 
cygwin escape the spaces or convert the path to 8.3 format (along the 
same lines that cygpath.exe -d operates)?  I know that this isn't the 
most elegant or aesthetically pleasing solution, but it seems like a 
reasonable compromise given your 4 statements above.


More information about the Cygwin-developers mailing list