Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8bb01f3870b7a84f06bc020fdd01ecc93e6f4151
Ticket: 496733ffffffffffffffffffffffffffffffffff
Possible fix for obscure fconfigure bug
User & Date: mdejong on 2001-12-26 06:50:10
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    I ran into this bug while re-implementing fconfigure in
    Jacl.
    It seems the Tcl_GetChannelOption function does not
    quite
    know what to do about a channel that is neither
    readable nor
    writable. Here is what it currently returns:
    
    % set sock [socket -server accept 0]
    sock3
    % fconfigure $sock
    -blocking 1 -buffering full -buffersize 4096 -encoding
    iso8859-1 -eofchar -translation -sockname {0.0.0.0
    0.0.0.0 2001}
    
    The -eofchar and -translation properties should at
    least have
    some value in the list. What exactly these properties
    would
    be used for on a server socket is not clear. For
    example,
    why would you want to set the -blocking property on a
    server socket?
    
    Also note that the Tcl_SetChannelOption method does not
    know
    how to set these values since it is not clear if the
    input
    out the output value would be changed for a server
    socket.
    
    The quick solution I came up with was to just pretend
    these
    values are read only. It was easy to implement and test
    and I can't imagine this would actually matter to
    anyone,
    so it seemed like the right thing to do. The attached
    patch
    implements these changes and add some test cases that
    check
    the behavior.
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.4a4"
  5. priority changed to: "3 Low"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "mdejong"
  9. subsystem changed to: "24. Channel Commands"
  10. title changed to: "Possible fix for obscure fconfigure bug"
  11. type changed to: "Bug"