Overview
Artifact ID: | 2f3f6a88532db43f16a182860abfa30051b01c013a5644dbf873756e7eb1a51a |
---|---|
Ticket: | 1975182bddc84f6601f60b0acf2f326eae10316f
tcl::chan::cat - syntax error and bad behavior with fileevents |
User & Date: | anonymous 2019-03-12 23:15:43 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
tcl::cache::cat 1.0.3 has a critical bug, if an event handler has been registered on the reflected channel. By running the following code (interactively from wish) ----------------------------- package tcl::chan::chan package tcl::chan::string # setup 2 simple data-channels. # Here we use two simple string-channels but we could also [open] two simple files. set fd1 [tcl::chan::string "ABCDE..XYZ"] set fd2 [tcl::chan::string "0123456789"] # setup a cat'enated channel set ch [tcl::chan::cat $fd1 $fd2] # register a file handler printing the contents of the cat'enated channel # by reading 4 bytes at time -- NOTE: ch is a global variable # expected result is # <<ABCD>> # <<E..X>> # <<YZ01>> # <<2345>> # <<6789>> # <<>> chan event $ch readable { if { [eof $ch] } { close $ch } else { puts "<<[read $ch 4]>>" } } # ! NOTHING happens !!!! # trying to force a read ... read $ch 1 ;# --> error ... see below -------------------------------------------- bad event name "rc7": must be readable or writable -------------------------------------------- There's an error in the logic of the "watch" method. I included a zip with all the updated files; corrections and some code cleaning. - cat.tcl -- the main correction, and version changed to 1.0.3 - pkgIndex.tcl -- version changed - cat.man -- version changed - changeLog -- version changed ABU
- foundin changed to: "1.19"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "af9c70d5700d5af288b87a3a9ed94e1300911d18"
- resolution changed to: "None"
- severity changed to: "Critical"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "tcl :: chan :: *"
- title changed to:
tcl::chan::cat - syntax error and bad behavior with fileevents
- type changed to: "Bug"