Tcl Source Code

View Ticket
Login
Ticket UUID: fb9acd64a5b76e0e1fba607b7c3eebd0f33dab0a
Title: effect of close affects parent interp in specific case
Type: Bug Created on: 2025-04-02 11:14:03
Submitter: anonymous Assigned to: nobody
Subsystem: 20. [interp] Severity: Minor
Priority: 5 Medium Last modified: 2025-04-02 11:14:03
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: 8.6.12, 9.0.1
Description:
[interp create] eval {close stdout}
puts "hello"

fails with: can not find channel named "stdout"

Any kind of channel operation before the interp make it work as excepted:

puts "start"
[interp create] eval {close stdout}
puts "hello"

Even accessing no-existing channels:

catch {fconfigure dummy}
[interp create] eval {close stdout}
puts "hello"

Maybe related to this: https://core.tcl-lang.org/tcl/tktview/5338d8e82