Tcl Library Source Code

Artifact Content
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Artifact 2f3f6a88532db43f16a182860abfa30051b01c013a5644dbf873756e7eb1a51a:

Ticket change [2f3f6a8853] - New ticket [1975182bddc84f66|1975182bdd] <i>tcl::chan::cat - syntax error and bad behavior with fileevents</i>. by anonymous 2019-03-12 23:15:43.
D 2019-03-12T23:15:43.363
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment tcl::cache::cat\s1.0.3\shas\sa\scritical\sbug,\sif\san\sevent\shandler\shas\sbeen\sregistered\son\sthe\sreflected\schannel.\s\r\n\r\nBy\srunning\sthe\sfollowing\scode\s(interactively\sfrom\swish)\r\n\r\n-----------------------------\r\npackage\stcl::chan::chan\r\npackage\stcl::chan::string\r\n\r\n\s\s#\ssetup\s2\ssimple\sdata-channels.\r\n\s\s#\s\sHere\swe\suse\stwo\ssimple\sstring-channels\sbut\swe\scould\salso\s[open]\stwo\ssimple\sfiles.\s\r\nset\sfd1\s[tcl::chan::string\s"ABCDE..XYZ"]\r\nset\sfd2\s[tcl::chan::string\s"0123456789"]\r\n\s#\ssetup\sa\scat'enated\schannel\r\nset\sch\s[tcl::chan::cat\s$fd1\s$fd2]\r\n\r\n\s#\sregister\sa\sfile\shandler\sprinting\sthe\scontents\sof\sthe\scat'enated\schannel\r\n\s#\s\sby\sreading\s4\sbytes\sat\stime\s--\sNOTE:\sch\sis\sa\sglobal\svariable\r\n#\sexpected\sresult\sis\r\n#\s<<ABCD>>\r\n#\s<<E..X>>\r\n#\s<<YZ01>>\r\n#\s<<2345>>\r\n#\s<<6789>>\r\n#\s<<>>\r\nchan\sevent\s$ch\sreadable\s{\r\n\s\s\s\sif\s{\s[eof\s$ch]\s}\s{\sclose\s$ch\s}\selse\s{\sputs\s"<<[read\s$ch\s4]>>"\s}\r\n}\r\n\r\n#\s!\sNOTHING\shappens\s!!!!\r\n\r\n\s#\strying\sto\sforce\sa\sread\s...\r\nread\s$ch\s1\s;#\s\s-->\s\serror\s...\ssee\sbelow\r\n--------------------------------------------\r\nbad\sevent\sname\s"rc7":\smust\sbe\sreadable\sor\swritable\r\n--------------------------------------------\r\n\r\nThere's\san\serror\sin\sthe\slogic\sof\sthe\s"watch"\smethod.\r\n\r\nI\sincluded\sa\szip\swith\sall\sthe\supdated\sfiles;\scorrections\sand\ssome\scode\scleaning.\r\n-\scat.tcl\s\s\s\s\s\s\s--\s\sthe\smain\scorrection,\sand\sversion\schanged\sto\s1.0.3\r\n-\spkgIndex.tcl\s\s--\s\sversion\schanged\s\r\n-\scat.man\s\s\s\s\s\s\s--\s\sversion\schanged\r\n-\schangeLog\s\s\s\s\s--\s\sversion\schanged\r\n\r\nABU
J foundin 1.19
J is_private 0
J login anonymous
J priority 5\sMedium
J private_contact af9c70d5700d5af288b87a3a9ed94e1300911d18
J resolution None
J severity Critical
J status Open
J submitter anonymous
J subsystem tcl\s::\schan\s::\s*
J title tcl::chan::cat\s-\ssyntax\serror\sand\sbad\sbehavior\swith\sfileevents
J type Bug
K 1975182bddc84f6601f60b0acf2f326eae10316f
U anonymous
Z de3928fc38e6d2bcbc4c15ebe481511f