Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 33038694c520817834a25d2e9479e3292b44e6c0570a372af1d3df346f6f3286
Ticket: 9ca87e6286262a62f379dde23604535b0b2dc1d6
Sync fcopy buffers input in ReadChars()
User & Date: pooryorick on 2023-04-03 16:32:22
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    In [4a7397e0b3] it was reported that sync fcopy buffers input, but the example
    provided was only for the ReadBytes() case, and only that branch in the code
    was fixed.  The following script shows that the issue still exists for the
    ReadChars() branch, waiting forever for read() to return:
    
    <code><verbatim>
    file delete $path(output)
    set f1 [open $path(output) w]
    puts -nonewline $f1 {
        chan configure stdin -encoding iso8859-1 -translation lf -buffering none
        fcopy stdin stdout
    }
    close $f1
    set f1 [open "|[list [info nameofexecutable] $path(output)]" r+]
    try {
        chan configure $f1  -buffering none
        puts -nonewline $f1 A
        set ch [read $f1 1]
    } finally {
        if {$f1 in [chan names]} {
    	close $f1
        }
    }
    lindex $ch
    </verbatim></code>
    
  5. is_private changed to: "0"
  6. login: "pooryorick"
  7. priority changed to: "5 Medium"
  8. private_contact changed to: "2b2275eab1118e1fab0016cf1c5702893c6af86c"
  9. resolution changed to: "None"
  10. severity changed to: "Important"
  11. status changed to: "Open"
  12. submitter changed to: "pooryorick"
  13. subsystem changed to: "25. Channel System"
  14. title changed to: "Sync fcopy buffers input in ReadChars()"
  15. type changed to: "Bug"