Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cd8a690d99fc0fc84eec2f21045da9e09ffc2877c6a9748f4120f9332a969169
Ticket: e8efa378a96bca5e69e00e5feff1315c932ed47b
Duplicate std* channels in different Threads
User & Date: serhiy.storchaka on 2026-10-14 19:53:36
Changes

  1. icomment:
    You are right, that sentence was too general. In wish on Windows the standard channel names in a new thread are just given to the first channels opened there (test.txt etc. in your example), so closing them closes only those channels. The sentence applies to tclsh (your second example): there stdout of every thread refers to the same file descriptor 1, so closing stdout in one thread breaks stdout of the main thread.
    
    That ordinary channels become standard channels in a thread without platform standard channels is still the behavior documented in Tcl_StandardChannels(3). Not doing that in threads other than the main thread would be a change of that behavior, which needs a decision.
    
  2. login: "serhiy.storchaka"
  3. mimetype: "text/x-fossil-wiki"