Skip to content
Tcl Source Code Artifact [00368836b0]
Login

Artifact [00368836b0]

Artifact 00368836b074e1e3fd733a8516f91b6b9a061b14:

Ticket change [00368836b0] - New ticket [218003ffffffffff|218003ffff] <i>&quot;readable&quot; fileevents behave inaccurately on Windows</i>. by nobody on 2000-10-26 00:51:52.
D 2000-10-26T00:51:52
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s700\sBug\nVersion:\s8.0.3\nSubmitDate:\s'1998-10-09'\nLastModified:\s'1999-08-09'\nSeverity:\sMED\nStatus:\sClosed\nSubmitter:\ssuresh\nChangedBy:\sredman\nOS:\sAll\nOSVersion:\sNA\nMachine:\sNA\nFixedDate:\s'2000-10-25'\nFixedInVersion:\s8.2b2\nClosedDate:\s'1999-08-09'\n\n\nBasically\sthere\sappears\sto\sbe\sa\sbug\sin\sthe\shandling\sof\sevents\svia\sthe\s"fileevent"\scommand\son\sWindows.\s\sThe\sbug\sis\sthat\son\sWindows,\sfileevents\scome\sin\sat\sunpredictable\stimes\sand\sinconsistent\swith\sthe\ssame\sscript\sthat\sruns\son\sUNIX.\s\s\sSee\sthe\sscript\sbelow\sand\sthe\sproduced\soutput\son\sboth\sWindows\sand\sUNIX.\n\nSee\sthe\sfollowing\sscript\n\n=======================================\n#\sfileevent-bug.tcl\nset\shosts\s{pop\shippo\scerridwen}\nproc\smyProc\s{f\shost\shostDone}\s{\n\s\s\s\sif\s{![eof\s$f]}\s{\nputs\s"0\s[clock\ssec]\s$host\s$f\s--\sreadable"\nread\s$f\n\s\s\s\s}\selse\s{\nputs\s"1\s[clock\ssec]\s$host\s$f\s--\seof"\nset\s::$hostDone\s$host\n\s\s\s\s}\n}\nset\ssleepTime\s0\nforeach\shost\s$hosts\s{\n\s\s\s\sset\shostFiles($host)\s[open\s"|\srsh\s$host\ssleep\s[incr\ssleepTime\s10]"]\n\s\s\s\sputs\s"$host\s$hostFiles($host)"\n}\nset\sallHostsDone\s0\nforeach\shost\s[array\sname\shostFiles]\s{\n\s\s\s\sfileevent\s$hostFiles($host)\sreadable\s\s[list\smyProc\s$hostFiles($host)\s$host\shostDone]\n}\nwhile\s{[array\ssize\shostFiles]}\s{\n\s\s\s\svwait\shostDone\n\s\s\s\sputs\s"2\s[clock\ssec]\s$hostDone\s$hostFiles($hostDone)\s--\shostdone"\n\s\s\s\scatch\s{close\s$hostFiles($hostDone)}\sresult\n\s\s\s\sunset\shostFiles($hostDone)\n}\n=======================================\n\nIf\syou\srun\sthis\sscript\son\sWindows,\syou\swill\sget\sthe\sfollowing\soutput:\n\n=======================================\n[c:\\temp]tclsh80\sz:\\fileevent-bug.tcl\npop\sfile160\nhippo\sfile76\ncerridwen\sfile24\n0\s907963252\spop\sfile160\s--\sreadable\n0\s907963262\scerridwen\sfile24\s--\sreadable\n0\s907963284\shippo\sfile76\s--\sreadable\n1\s907963284\spop\sfile160\s--\seof\n2\s907963284\spop\sfile160\s--\shostdone\n1\s907963284\scerridwen\sfile24\s--\seof\n2\s907963284\scerridwen\sfile24\s--\shostdone\n1\s907963284\shippo\sfile76\s--\seof\n2\s907963284\shippo\sfile76\s--\shostdone\n=======================================\n\nHowever,\son\sUNIX\syou\sget:\n\n=======================================\npop>\stcls8.0h\sfileevent-bug.tcl\s\npop\sfile3\nhippo\sfile5\ncerridwen\sfile8\n0\s907963245\spop\sfile3\s--\sreadable\n1\s907963245\spop\sfile3\s--\seof\n2\s907963245\spop\sfile3\s--\shostdone\n0\s907963255\shippo\sfile5\s--\sreadable\n1\s907963255\shippo\sfile5\s--\seof\n2\s907963255\shippo\sfile5\s--\shostdone\n0\s907963266\scerridwen\sfile8\s--\sreadable\n1\s907963266\scerridwen\sfile8\s--\seof\n2\s907963266\scerridwen\sfile8\s--\shostdone\n=======================================\n\n\n\nThis\sbug\swas\sdiscovered\sduring\sdevelopment\sof\sTclPro\snightly\sbuild\sscript.\s\sThe\sscript\skicks\soff\sUNIX\shosts\sin\sparallel\sfrom\sWindows\svia\sthe\sWindows\sRSH.EXE\scommand;\s\sif\syou\slook\sat\sthe\sbuild\soutput\se-mail,\syou\ssee\sthat\sall\sthe\sUNIX\sbuilds\sfinish\sexactly\sat\sthe\ssame\stime\s(to\sthe\ssecond),\swhich\sis\sunlikely\sand\sis\sdue\sto\s"fileevent"\swaiting\sfor\sall\shosts\sto\s"remove"\sthemselves\sfrom\sthe\s"fileevent"\slist.\s\s(suresh:981009)\n\n
J foundin obsolete:\s8.0.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 62.\s(unused)
J title "readable"\sfileevents\sbehave\sinaccurately\son\sWindows
J type Bug
K 218003ffffffffffffffffffffffffffffffffff
U nobody
Z 7ad3b14aa5ce40696687a92166297c56