Re: Windows env-Bug?



Donal K. Fellows wrote:
David Gravereaux wrote:
Maybe a special behavior regarding setting any variable to ""
implies a delete (all platforms?),

Categorically not; there are a number of UNIX environment variables
that have a different meaning when set to the empty string as opposed
to when unset.

I'm not serious.. just rattling chains.

One of the root problems here is that the UNIX and
Windows behaviours are just different here; it has the feel of a short-
cut taken long ago (in MS-DOS 1.0 or 2.0!) that's now too deeply
ingrained to fix. :-\

On the other hand, that doesn't mean that we shouldn't add some code
so that the unsetting of the element happens immediately on Windows.
But it's definitely going to be platform-specific because the
underlying environment variable behaviour is also platform-specific.
Can't be helped really.

The code for it is all platform neutral libc. It'll take some work to split
it out. The caching behavior might have to be removed which would render
traces inoperative.

Currently, a DLL (in the chain of things) might call win32's
SetEnvironmentVariable() which is not reflected by libc's cache of the real
environment which Tcl sees. Tcl goes so far as to export a Tcl_PutEnv (i
think) so traces can fire, but is meaningless to code that uses the real win32
system environment access functions.

Who weighs more there? The real system environment to obtain correct answers,
or libc's buggy behavior due to system differences which has the ability to
fire traces?

Here's that compromise part in all its ugliness.

--
"Someday I'll write my own philosophy book." -Calvin

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • Re: ENV variable NOT recognized ! Reboot really necessary ????
    ... this will only change the environment block for new processes created *after* the change. ... Existing processes will keep on using their current environment block, which is the same as it was before you made the change. ... But an application needs to be written to explicitly do this; there's no mechanism in the operating system to universally update environment variables on the fly for running processes. ... For example, say you had a command prompt open, and you run a SET command to display the current variables. ...
    (microsoft.public.windowsxp.help_and_support)
  • [REVS] Using Environment for Returning Into Lib C
    ... This article explains how to use the environment variables to successfully ... The environment will consequently be used to store it. ... It is easy to write a simple program to put the command directly into the ... declare -x COLORTERM="" ...
    (Securiteam)
  • Re: SSH environment variable passing
    ... has to be a capability of both the client and the server. ... to support only a couple of specific environment variables. ... I have been told that allowing unlimited environment variables to be set ... A parallel situation exists in telnet. ...
    (SSH)
  • Re: Multiple interpreters retaining huge amounts of memory
    ... environment variable separation for changes made unique to a sub ... you can make changes to environment variables ... extension module in different sub interpreters, ...
    (comp.lang.python)
  • Re: New "base document" available
    ... "The PRINTENV command is used to display environment variable ... Environment variables are a feature of the shell, ... then a configuration file, and then the environment or the registry. ... it is impossible to get a facility added to COBOL unless they ...
    (comp.lang.cobol)