Skip to content
Tcl Source Code View Ticket
Login

View Ticket

serial fileevent problem (Windows)

Closed / Fixed218747ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:04:53
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
welch Closed ticket [218747ffff]. [History diff]2000-10-26 08:28:13
dgp Ticket [218747ffff]: 3 changes [History diff]2001-04-23 02:14:17
Log in (anonymous is fine) to add a comment.