Overview
| Artifact ID: | 29da20aee4958382b6a792462e7a5cacec92ceea |
|---|---|
| Ticket: | 519868ffffffffffffffffffffffffffffffffff
[fblocked] on cmd pipe always returns 0 |
| User & Date: | krischan on 2002-02-19 11:10:51 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.4a3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "krischan"
- subsystem changed to: "25. Channel System"
- title changed to: "[fblocked] on cmd pipe always returns 0"
- type changed to: "Bug"