| Ticket UUID: | 6235d23a7619cdabe706e09fa77421536c42b3ec | ||
| Title: | Inconsistent handling of environment variables with [interp create] | ||
| Type: | Bug | Created on: | 2021-06-19 19:06:02 |
| Submitter: | erikleunissen | Assigned to: | nobody |
| Subsystem: | 08. Environment Variables | Severity: | Important |
| Priority: | 5 Medium | Last modified: | 2021-07-18 12:05:02 |
| Status: | Open | Closed by: | nobody |
| Resolution: | None | Closed on: | |
| Version: | 8.6.11 | ||
| Description: | ||||
When creating a child interpreter, environment variables are handled differently between Linux and Windows. While I find the behaviour under Linux logical, I don't understand the behaviour under Windows, especially the fact that creation of a child interpreter affects the environment variables in the parent interpreter. The attached file exercise.tcl demonstrates the issue when I run it under the two mentioned OS's. My observations: > tclsh exercise.tcl unix 1 0 0 0 > tclsh exercise.tcl windows 1 0 1 1 | ||||
| User Comments: | ||||
erikleunissen added on 2021-07-18 12:05:02:
I believe that this is more severe than "Minor". So I take the liberty to increase the severity level. Also, making the questionable behaviour under windows more conspicuous by presenting it here in the ticket body (instead of an attachment).
% set tcl_platform(platform)
windows
% info exists env(HOME)
1
% unset env(HOME)
% info exists env(HOME)
0
% interp create child
child
interp eval child {info exists env(HOME)}
1
% info exists env(HOME)
1
| ||||
Attachments:
- exercise.tcl [download] added by erikleunissen on 2021-06-19 19:06:24. [details]
