Re: Windows env-Bug?
- From: David Gravereaux <davygrvy@xxxxxxxxx>
- Date: Wed, 25 Jul 2007 11:05:03 -0700
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
- Follow-Ups:
- Re: Windows env-Bug?
- From: Joe English
- Re: Windows env-Bug?
- References:
- Windows env-Bug?
- From: Gerhard Reithofer
- Re: Windows env-Bug?
- From: Torsten Edler
- Re: Windows env-Bug?
- From: Helmut Giese
- Re: Windows env-Bug?
- From: Torsten Edler
- Re: Windows env-Bug?
- From: Gerhard Reithofer
- Re: Windows env-Bug?
- From: David Gravereaux
- Re: Windows env-Bug?
- From: Donal K. Fellows
- Windows env-Bug?
- Prev by Date: Re: Really strange performance problem with string map vs regsub
- Next by Date: A little problem with "constant" arrays
- Previous by thread: Re: Windows env-Bug?
- Next by thread: Re: Windows env-Bug?
- Index(es):
Relevant Pages
|