Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 42e1d39fcbd9903f5831d5d879b41e5ed840d721
Ticket: 1350564fffffffffffffffffffffffffffffffff
Inadequate fcopy operation
User & Date: coldstore on 2005-11-22 14:30:55
Changes

  1. icomment:
    Logged In: YES 
    user_id=19214
    
    I'm not sure I follow ... the following code seems to work
    as I would expect it to, in a recent 8.5 - regardless of
    whether the [fileevent] occurs before or after the [fcopy].
    
    Is the problem that a readable event won't trigger while the
    [fcopy] is active (that is, before Done is called?)
    
    proc readable {sock} {
        puts stderr "R: [gets $sock]"
    }
    
    proc done {args} {
        puts stderr "DONE: $args"
    }
    
    proc accept {sock args} {
        puts stderr "accept $args"
        set fd [open fcopy-socket.tcl r]
        fcopy $fd $sock -command done
        fileevent $sock readable [list readable $sock]
    }
    
    socket -server accept 9999
    
    vwait forever
    
    
    
  2. login: "coldstore"
  3. mimetype: "text/plain"
  4. username: "coldstore"