Skip to content
Tcl Source Code Artifact [6086f9392e]
Login

Artifact [6086f9392e]

Artifact 6086f9392e0c919aa46f37eb1cbba35b22629e19:

Ticket change [6086f9392e] - New ticket [219307ffffffffff|219307ffff] <i>Tcl&#39;s fileevent callback on a socket does not work the same </i>. by nobody on 2000-10-26 05:10:27.
D 2000-10-26T05:10:27
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3319\sBug\nVersion:\s8.2.1\nSubmitDate:\s'1999-11-05'\nLastModified:\s'1999-11-11'\nSeverity:\sMED\nStatus:\sUnAssn\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sLinux-Red\sHat\nOSVersion:\sRedHat\s5.2\s(intel)\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-10-25'\n\n\nName:\nMo\sDeJong\n\nReproducibleScript:\n#\sFirst,\sstart\sthe\s"server"\sand\slisten\sfor\sconnections.\n#\sWhen\sa\sconnection\sarrives\sjust\sclose\sthe\ssocket.\n\nset\sport\s6789\n\nproc\sincomingConnection\s{\sstream\saddr\sport\s}\s{\n\s\s\s\sputs\s"incomingConnection\sfrom\s$addr\s$port"\n\s\s\s\sclose\s$stream\n}\n\nset\sserver\s[socket\s-server\sincomingConnection\s$port]\n\n#\sNow\screate\sthe\s"client"\ssocket\swhich\smakes\sa\sconnection\n#\sThis\scauses\sthe\serror\s{error\swriting\s"sock7":\sbroken\spipe}\n\nproc\scanWrite\s{\s}\s{\n\s\sglobal\ssocket\n\s\sif\s{[eof\s$socket]}\s{\n\s\s\s\sputs\s"EOF\sON\sSOCKET"\n\s\s}\n\n\s\sputs\s"Writing\sto\ssocket"\n\s\sputs\s$socket\s"CLOSE"\n}\n\nset\ssocket\s[socket\slocalhost\s$port]\nfconfigure\s$socket\s-buffering\sline\s-blocking\s0\nfileevent\s$socket\swritable\scanWrite\n\nvwait\sforever\n\nObservedBehavior:\nThis\sgenerates\san\serror\son\sUNIX\ssystems\swhen\sthe\ssocket\sis\sclosed\son\sthe\nserver\sside.\sThe\sclient\stries\sto\swrite\swhen\sit\sgets\sa\sfileevent\swritable\nevent,\sand\sthis\sgenerates\sand\sduring\sthe\swrite()\scall\sbecause\sthe\ssocket\nwas\sclosed.\n\n\nIt\sdoes\snot\swork\son\sthese\ssystems:\nRedHat\sLinux\s5.2\swith\sTcl\s8.2.1\nSolaris\s5.6\swith\sTcl\s8.2.1\nIRIX\s6.2\swith\sTcl\s8.2.1\n\nBut\sunder\sNT\swith\sTcl\s8.2.1,\sthe\sextra\sfileevent\ncallback\sis\snot\sgenerated.\n\nDesiredBehavior:\nA\sfileevent\swritable\scallback\sshould\snot\sbe\sgenerated\son\sa\sclosed\ssocket\nunder\sUNIX\ssystems.\n\n\n\nNewsgroup\sreports\sindicate\sthat\sNT\shas\sthe\sincorrect\sbehavior.\s\n--\s11/11/1999\shobbs
J foundin obsolete:\s8.2.1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 63.\s(unused)
J title Tcl's\sfileevent\scallback\son\sa\ssocket\sdoes\snot\swork\sthe\ssame\s
J type Bug
K 219307ffffffffffffffffffffffffffffffffff
U nobody
Z b9db20daecd7a76ab1fa0b3519891327