Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: df0fd021c2d8cf28575c154221eb4f346a655790
Ticket: 593810ffffffffffffffffffffffffffffffffff
Channel Transfer crashes
User & Date: andreas_kupries on 2002-08-21 02:46:07
Changes

  1. icomment:
    Logged In: YES 
    user_id=75003
    
    Found the problem. When a socket is created in a thread the 
    socket driver will be initialized for that thread, especially its 
    TSD slot.
    
    Call sequence:
        SocketObjCmd => TclpHasSockets => InitSocket
    
    Now if a thread is created and no socket is created nothing is 
    iniitialized. The channel transfer then inserts a socket into the 
    thread, but this does not run any code to completely initialize 
    the driver. Hence the TSD slot is uninitialized and thus the 
    crash.
    
    Because of the workaround described above (create and 
    destroy a temp socket in the thread before transfering 
    sockets) the priority will go down. 
    
    The true fix however is to extend the channel driver with an 
    init-function which can be used by channels during 
    registration in an interp to ensure that their driver is initialized 
    in the thread of said interp.
    
    
  2. login: "andreas_kupries"
  3. mimetype: "text/plain"
  4. priority changed to: "7 High"
  5. username: "andreas_kupries"