- priority: 5 --> 2
- status: open --> closed-fixed
OriginalBugID: 1980 Bug
Version: 8.1.1
SubmitDate: '1999-05-04'
LastModified: '1999-07-08'
Severity: SER
Status: Released
Submitter: pat
ChangedBy: redman
RelatedBugIDs: 2217
OS: Windows 95
Machine: X86
FixedDate: '1999-07-08'
FixedInVersion: 8.2b1
ClosedDate: '2000-10-25'
Name:
Holger Kanwischer
Extensions:
none
CustomShell:
none
ReproducibleScript:
Sample script (simple terminal emulator):
proc stdinRead {} {
global TTY
if {[eof stdin]} {
exit
}
gets stdin Line
puts $TTY $Line
}
proc ttyRead {} {
global TTY
if {[eof $TTY]} {
catch {close $TTY}
} else {
puts -nonewline [read $TTY]
}
}
set TTY [open "com1:" r+]
fconfigure $TTY -blocking 0 -buffering none -translation {auto cr} -mode 19200,n,8,1
fileevent $TTY readable ttyRead
fileevent stdin readable stdinRead
vwait forever
Command line:
tclsh81 win-seri.tcl
ObservedBehavior:
The read command in the fileevent handler ttyRead always returns only
one
character, even if more characters are in the input buffer of the
operating
system.
This behavior significantly slows down the application.
DesiredBehavior:
The read command should return all characters from the input buffer.
Applied patch provided by Rolf Schroedter.
-- 07/08/1999 redman