Tcl package Thread source code

Ticket Change Details
Login
Overview

Artifact ID: f87645b7cf263dc3edfb107d93fe88f800e137664a2bc604de1d59f73413a523
Ticket: c72c2eb54b644dc5e5b44b6a410311fca1b7a3ef
Invalid channel names in thread
User & Date: tomkiti 2018-03-03 18:49:02
Changes

  1. Change assignee to "nobody"
  2. Change closer to "nobody"
  3. Change cmimetype to "text/plain"
  4. Change comment to:
    In wish 8.6.8 on Windows, the 2nd, 3rd, and 4th files that are opened within a thread return the channel names stdin, stdout, and stderr. This does not happen in the main thread, in tclsh 8.6.8, in wish 8.5.*, or on Linux.
    
    For example, the following script writes the first 5 opened channel names to a log file:
    
        package require Thread
        set tid [::thread::create]
        ::thread::send $tid {
            set chan1 [open c:/temp/log.txt w]
            set chan2 [open nul w]
            set chan3 [open nul w]
            set chan4 [open nul w]
            set chan5 [open nul w]
            puts $chan1 "chan1 = $chan1"
            puts $chan1 "chan2 = $chan2"
            puts $chan1 "chan3 = $chan3"
            puts $chan1 "chan4 = $chan4"
            puts $chan1 "chan5 = $chan5"
            close $chan1
            close $chan2
            close $chan3
            close $chan4
            close $chan5
        }
        exit
    
    The file c:/temp/log.txt will contain something like:
    
        chan1 = file303b0c0
        chan2 = stdin
        chan3 = stdout
        chan4 = stderr
        chan5 = file3033160
    
    I don't know if the problem is in Tcl, wish, or the Thread package, but I'm reporting it here.
    
  5. Change foundin to "2.8.2"
  6. Change is_private to "0"
  7. Change login to "tomkiti"
  8. Change priority to "5 Medium"
  9. Change private_contact to "1c57e67924247fd7926e89348f266c081ec57db2"
  10. Change resolution to "None"
  11. Change severity to "Important"
  12. Change status to "Open"
  13. Change submitter to "tomkiti"
  14. Change subsystem to "80. Thread Package"
  15. Change title to "Invalid channel names in thread"
  16. Change type to "Bug"