Artifacts Associated With Ticket 519868ffff
Ticket change [29da20aee4] (rid 118459) by krischan on 2002-02-19 11:10:51:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
starting with Tcl8.1 the fblocked command applied to a command pipe always returns false, even if the recent [read] returned less bytes than wanted. Example script: puts Tcl:$tcl_patchLevel set in [open "|/bin/sh -c {sleep 2; echo Hallo Welt}"] fconfigure $in -blocking 0 -translation binary while {42} { set bytes [read $in 11] if {[eof $in]} { close $in break } puts [format "read of %d bytes was %sblocked" \ [string length $bytes] \ [expr {[fblocked $in] ? "" : "non "}]] after 1100 } Output for various Tcl versions: > tcl8.0.5/unix/tclsh fblocked.tcl Tcl:8.0.5 read of 0 bytes was blocked read of 0 bytes was blocked read of 11 bytes was non blocked > tcl8.1.1/unix/tclsh fblocked.tcl Tcl:8.1.1 read of 0 bytes was non blocked read of 0 bytes was non blocked read of 11 bytes was non blocked > tcl8.4a3/unix/tclsh fblocked.tcl Tcl:8.4a3 read of 0 bytes was non blocked read of 0 bytes was non blocked read of 11 bytes was non blocked - foundin initialized to: "obsolete: 8.4a3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "krischan"
- subsystem initialized to: "25. Channel System"
- title initialized to: "[fblocked] on cmd pipe always returns 0"
- type initialized to: "Bug"
Ticket change [619b142f34] (rid 92270) by matzek on 2004-05-03 19:02:28:
- icomment:
Logged In: YES user_id=330806 > /usr/local/ActiveTcl/bin/tclsh8.4 ~/fblocked.tcl Tcl:8.4.6 read of 0 bytes was non blocked read of 0 bytes was non blocked read of 11 bytes was non blocked Will this ever get fixed?
- login: "matzek"
- mimetype: "text/plain"
- username: "matzek"
- icomment:
Ticket change [556689879c] (rid 259725) by serhiy.storchaka on 2026-10-21 10:03:37:
- icomment:
Fixed in 8.5.16 and 8.6.2 by the CHANNEL_BLOCKED/EOF rework [2a40293a49] (8.5: [f6b7d496c4]): after a short non-blocking read from a command pipe, <tt>fblocked</tt> now returns 1.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [133321b3e8] (rid 260017) by serhiy.storchaka on 2026-10-22 17:19:30:
- closedate changed to: "2461334.919188669"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"