Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b675a670a7f611b77dc6f8b794f3af790839b382
Ticket: 219159ffffffffffffffffffffffffffffffffff
Need to split bidirectional channels (sockets; pipes or devi
User & Date: ferrieux on 2008-12-01 20:44:24
Changes

  1. icomment:
    First a minor thing: replace objv[3] by objv[2] for the direction argument in Tcl_CloseObjCmd (segfault ;-)
    Now, more worrisome: half-close (w) on a socket actually does a full close: the channel is de-registered:
    
        % set f [socket localhost 9999]
        sock3
        % fconfigure $f -buffering line
        % puts $f rrr
        % gets $f
    sdfsd
        % close $f w
        % gets $f
        can not find channel named "sock3"
    
    and at the syscall level, the fd is close()d too, as shown by starce:
    
      Process 14165 attached - interrupt to quit
      read(0, "close $f w\n", 4096)           = 11
      close(3)                                = 0
      write(1, "% ", 2)                       = 2
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"