Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-09-12
13:10 • Closed ticket [9ca87e6286]: Sync fcopy buffers input in ReadChars() plus 4 o... artifact: 335a05f74f user: jan.nijtmans
2023-04-04
16:27 • Ticket [9ca87e6286]: 3 changes artifact: 8211af64fb user: pooryorick
16:26
Fix for [9ca87e6286262a62], sync fcopy buffers input in ReadChars(). check-in: ab027cdce4 user: pooryorick tags: core-8-branch
08:32 • Ticket [9ca87e6286] Sync fcopy buffers input in ReadChars() status still Pen... artifact: 26b21c32ca user: jan.nijtmans
2023-04-03
18:16 • Ticket [3096275fff] Sync fcopy buffers input status still Closed with 7 othe... artifact: a1e8dc4f04 user: pooryorick
17:15 • Pending ticket [9ca87e6286]: Sync fcopy buffers input in ReadChars() plus 5 ... artifact: da17a3c374 user: pooryorick
17:13
Fix for [9ca87e6286262a62], sync fcopy buffers input in ReadChars(). check-in: e08c4afb53 user: pooryorick tags: trunk, main
17:12
Fix for [9ca87e6286262a62], sync fcopy buffers input in ReadChars(). check-in: 9498359f85 user: pooryorick tags: bug-9ca87e6286262a62f
16:37
Failing test for [9ca87e6286262a62f], Sync fcopy buffers input in ReadChars(). check-in: 44d3129b05 user: pooryorick tags: bug-9ca87e6286262a62f
16:32 • New ticket [9ca87e6286] Sync fcopy buffers input in ReadChars(). artifact: 33038694c5 user: pooryorick

Sync fcopy buffers input in ReadChars()

Closed / Fixed9ca87e6286262a62f379dde23604535b0b2dc1d6Created 4 years agoUpdated 3 years ago
Descriptionwiki2023-04-03 16:32:22
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:

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
Referenced by1
  • a1e8dc4f04Ticket [3096275fff] Sync fcopy buffers input status still Closed with 7 other changes ticket2023-04-03 18:16:19
pooryorickwiki2023-04-03 17:15:01

Failing test in [44d3129b05b73a76]. Fixed in [e08c4afb5351744e].

jan.nijtmanswiki2023-04-04 08:32:44

Thanks for the fix!

The fix was only committed to trunk, but it should be done in core-8-branch too. Am I right?

pooryorickwiki2023-04-04 16:27:16

Yes, fixed for core-8-branch in [ab027cdce4].

jan.nijtmans Closed ticket [9ca87e6286]. [History diff]2023-09-12 13:10:50
Log in (anonymous is fine) to add a comment.