Artifacts Associated With Ticket 218003ffffffffff
Ticket change [00368836b0] (rid 119275) by nobody on 2000-10-26 00:51:52:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 700 Bug Version: 8.0.3 SubmitDate: '1998-10-09' LastModified: '1999-08-09' Severity: MED Status: Closed Submitter: suresh ChangedBy: redman OS: All OSVersion: NA Machine: NA FixedDate: '2000-10-25' FixedInVersion: 8.2b2 ClosedDate: '1999-08-09' Basically there appears to be a bug in the handling of events via the "fileevent" command on Windows. The bug is that on Windows, fileevents come in at unpredictable times and inconsistent with the same script that runs on UNIX. See the script below and the produced output on both Windows and UNIX. See the following script ======================================= # fileevent-bug.tcl set hosts {pop hippo cerridwen} proc myProc {f host hostDone} { if {![eof $f]} { puts "0 [clock sec] $host $f -- readable" read $f } else { puts "1 [clock sec] $host $f -- eof" set ::$hostDone $host } } set sleepTime 0 foreach host $hosts { set hostFiles($host) [open "| rsh $host sleep [incr sleepTime 10]"] puts "$host $hostFiles($host)" } set allHostsDone 0 foreach host [array name hostFiles] { fileevent $hostFiles($host) readable [list myProc $hostFiles($host) $host hostDone] } while {[array size hostFiles]} { vwait hostDone puts "2 [clock sec] $hostDone $hostFiles($hostDone) -- hostdone" catch {close $hostFiles($hostDone)} result unset hostFiles($hostDone) } ======================================= If you run this script on Windows, you will get the following output: ======================================= [c:\temp]tclsh80 z:\fileevent-bug.tcl pop file160 hippo file76 cerridwen file24 0 907963252 pop file160 -- readable 0 907963262 cerridwen file24 -- readable 0 907963284 hippo file76 -- readable 1 907963284 pop file160 -- eof 2 907963284 pop file160 -- hostdone 1 907963284 cerridwen file24 -- eof 2 907963284 cerridwen file24 -- hostdone 1 907963284 hippo file76 -- eof 2 907963284 hippo file76 -- hostdone ======================================= However, on UNIX you get: ======================================= pop> tcls8.0h fileevent-bug.tcl pop file3 hippo file5 cerridwen file8 0 907963245 pop file3 -- readable 1 907963245 pop file3 -- eof 2 907963245 pop file3 -- hostdone 0 907963255 hippo file5 -- readable 1 907963255 hippo file5 -- eof 2 907963255 hippo file5 -- hostdone 0 907963266 cerridwen file8 -- readable 1 907963266 cerridwen file8 -- eof 2 907963266 cerridwen file8 -- hostdone ======================================= This bug was discovered during development of TclPro nightly build script. The script kicks off UNIX hosts in parallel from Windows via the Windows RSH.EXE command; if you look at the build output e-mail, you see that all the UNIX builds finish exactly at the same time (to the second), which is unlikely and is due to "fileevent" waiting for all hosts to "remove" themselves from the "fileevent" list. (suresh:981009) - foundin initialized to: "obsolete: 8.0.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "62. (unused)"
- title initialized to:
"readable" fileevents behave inaccurately on Windows
- type initialized to: "Bug"
Ticket change [736650a14c] (rid 105040) by welch on 2000-10-26 08:12:11:
- closedate changed to: "2000-10-26T01:12:11"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [bedd810d8e] (rid 102161) by dgp on 2001-04-03 07:45:27:
- closedate changed to: "2001-04-03T00:45:27"
- closer changed to: "dgp"
- subsystem changed to: "27. Channel Types"
- title changed to:
"readable" fileevents behave inaccurately on Windows