Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d5813a1390c6cf5237e41184bfc86760fbfa34f3ddd5c97e1e679fcfbade50ac
Ticket: ea53aa804d4ef48bddf9e20869231d7017331b74
[Serial port] Ignore BREAK condition on read
User & Date: serhiy.storchaka on 2026-10-14 18:48:19
Changes

  1. icomment:
    On Windows a serial error such as BREAK is reported by one <nowiki>[read]</nowiki> as an I/O error, with the details in <code>fconfigure $chan -lasterror</code>, and then cleared; the data in the queue is not discarded. So you can catch the error and read again:
    
    <verbatim>
    if {[catch {read $rh} data] && "BREAK" in [fconfigure $rh -lasterror]} {
        set data [read $rh]
    }
    </verbatim>
    
  2. login: "serhiy.storchaka"
  3. mimetype: "text/x-fossil-wiki"
  4. resolution changed to: "Invalid"
  5. status changed to: "Closed"