Overview
| Artifact ID: | af1c372bd88255c826de0993a5d7d07b31a0d78f |
|---|---|
| Ticket: | 218553ffffffffffffffffffffffffffffffffff
Gets blocks in a readable fileevent |
| User & Date: | nobody on 2000-10-26 01:02:05 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 1051 Bug Version: 8.1b1 SubmitDate: '1999-01-15' LastModified: '1999-03-23' Severity: CRIT Status: Released Submitter: pat ChangedBy: redman OS: Windows 95 Machine: X86 FixedDate: '1999-03-23' ClosedDate: '2000-10-25' Name: Graham Haley ReproducibleScript: Set up a readable fileevent handler on stdin ... fileevent stdin readable { puts "handler fired" if {[gets stdin line] >= 0} { puts "$line" } else { puts "gets failed" } } and configure stdin to be non-blocking/line-buffered ... fconfigure stdin -blocking 0 -buffering line Process events ... set result 0 vwait result The handler immediately fires and gets blocks waiting for data. When it arrives, gets returns, prints it and immediately fires again. Surely this is wrong - the whole point of having an event handler is to prevent gets from blocking. This works ok on Solaris. ObservedBehavior: gets hangs DesiredBehavior: The event handler should only be called if there is data to read (and hence gets shouldn't block) 03/23/1999 16:05 - redman - Fixed tclWinConsole.c, fileevents are now firing when an entire line is available. Test case in tests/winConsole.test. - foundin changed to: "obsolete: 8.1b1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "Gets blocks in a readable fileevent"
- type changed to: "Bug"