Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e7a13b6c044b0c68f19a8b55894e8de15f311028
Ticket: 3307281fffffffffffffffffffffffffffffffff
Tcl_SetStdChannel not respected by 'puts'
User & Date: ferrieux on 2011-05-25 14:16:11
Changes

  1. icomment:
    Oh, I can see the logic: in the code path that you describe, the "stdout" value is first used when pointing to (say) Channel1, so as a side-effect of this access, an intrep of type Channel is computed and attached to it.
     Then you call Tcl_SetStdChannel(OUT,Channel2) but there is no easy way  to seek & destroy all instances of this association ("stdout", Channel1), so it remains in action.
    
    If this interpretation is right, a workaround is to force a shimmer on the "stdout" value, eg by converting it to a List or simply invalidating the intrep since you're at C level. Then on next IO access, the intrep will be recomputed in accordance with the new redirection.
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"