Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-10-21
10:03 • Closed ticket [1787911fff]: array search of env plus 4 other changes artifact: 8011cb6fc0 user: serhiy.storchaka
2013-11-21
09:24
The only relyable way of changing environment variables to uppercase (e.g. env(ComSpec) to env(COMSP... check-in: bd7d5c1f7c user: jan.nijtmans tags: trunk
09:18
The only relyable way of changing environment variables to uppercase (e.g. env(ComSpec) to env(COMSP... check-in: 26c40ac305 user: jan.nijtmans tags: core-8-5-branch
2013-11-20
11:57 • Ticket [219226ffff] fail to do array search on env status still Closed with ... artifact: 254217b96a user: jan.nijtmans
2013-09-27
10:34 • Ticket [219226ffff]: 5 changes artifact: 04276cdae3 user: dkf
10:33 • Closed ticket [219226ffff]. artifact: 3ac6c790bd user: dkf
10:29
[219226]: Rewrote how ::env is synchronized to the environment so it no longer smashes the array or ... check-in: afaff33553 user: dkf tags: trunk
2001-09-22
12:55 • Ticket [219226ffff] fail to do array search on env status still Open with 5 ... artifact: 44ceb49091 user: das
2001-09-08
06:34 • Ticket [219226ffff]: 1 change artifact: 2cad850325 user: andreas_kupries
2001-02-07
22:41 • Ticket [219226ffff]: 1 change artifact: 3b78f99834 user: dkf
2000-10-26
05:03 • New ticket [219226ffff]. artifact: 03e7402d1e user: nobody

fail to do array search on env

Closed / Fixed219226ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 13 years ago
Descriptionplain2000-10-26 05:03:50
OriginalBugID: 4109 Bug
Version: 8.2.2
SubmitDate: '2000-02-01'
LastModified: '2000-04-26'
Severity: SER
Status: Assigned
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 1999 3661
OS: All
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name: eric chang

Comments:
Some commands work on Tcl8.0

ReproducibleScript:
array startsearch env   #will create ssearchid s-1-env
array nextelement env s-1-env

ObservedBehavior:
error message: couldn't find search "s-1-env"

DesiredBehavior:
suppose one array element



Verified on NT with 8.3b2. 
-- 02/01/2000 hobbs

When the mechanism for maintaining the env() array changed in 8.1, this broke:

2/18/98 (hidden feature change) The way the env() array is shared among
interpreters changed.  Updates to env used to trigger write traces in
other interpreters.  This undocumented feature is no longer implemented.
Instead, variable tracing is used to keep the C-level environ array in sync
with the Tcl-level env array. This required adding TCL_TRACE_ARRAY support
to Tcl_TraceVar2 so that array names works properly. (BW)
*** POTENTIAL INCOMPATIBILITY ***

The problem is that the trace on the env array that is used to do this actually unsets the env array, then resets it from the environ array.  When env() is unset, the searches get deleted.

- eric

-- 03/24/2000 ericm
dkf Ticket [219226ffff]: 1 change [History diff]2001-02-07 22:41:19
andreas_kupries Ticket [219226ffff]: 1 change [History diff]2001-09-08 06:34:32
dasplain2001-09-22 12:55:31
Logged In: YES 
user_id=90580
dkfhtml2013-09-27 10:33:33

Packed dear old Crazy Aunt Beattie off to the nursing home in the sky.

New implementation lists the existing array contents, iterates over the environ elements adding/updating the env array as it goes and removing the elements from that list, then removes the elements from env that still remain in that list. More memory churn, but much more minimal changes.

dkfhtml2013-09-27 10:34:08

Side benefit: links to array elements now work sanely.

jan.nijtmanswiki2013-11-20 11:57:41

This bug-fix [afaff33553] introduced a regression (test-cases init-5.0, package-15.4 on win32), which is fixed in [bac3f9b139] and [f6c1c6b491].

Log in (anonymous is fine) to add a comment.