Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1921aec0a44ea5dbe512fe6d12e14f92c2152422
Ticket: 558932ffffffffffffffffffffffffffffffffff
read one byte: fconfigure -buffersize 1
User & Date: nobody on 2002-05-22 00:14:20
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Allow read(n) to read one byte, i.e. a system call of read(2)
    asks for one byte.  At the moment fconfigure(n) accepts
    a -buffersize argument but it has a minimum size of 10,
    perhaps this minimun could be 1 instead.
    
    It seems really bad not being able to do a read(fd, buf, 1)
    in tcl.
    
    If you do a "read $chan 1" a system call read is
    performed with the "buffersize" specified in fconfigure
    or some default (4k on Linux).  So, if you do
    
    fconfigure $chan -buffersize 10
    read $chan 1
    
    a
    read(fd, buf, 10)
    
    system call is issued.  So far, so good.  However,
    you cannot specify a -buffersize of less than 10.
    Actually, fconfigure accepts it but no reads are
    ever issued.
    
    regards,
    john
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "25. Channel System"
  10. title changed to: "read one byte: fconfigure -buffersize 1"
  11. type changed to: "RFE"