Skip to content
Tcl Source Code Artifact [dee0c49586]
Login

Artifact [dee0c49586]

Artifact dee0c49586c043db85e82098cf3937c3ab4f4da9:

Ticket change [dee0c49586] - New ticket [219301ffffffffff|219301ffff] <i>Tcl_Main misses file events unless &quot;update&quot; is explicitly ca</i>. by nobody on 2000-10-26 05:10:22.
D 2000-10-26T05:10:22
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s2660\sBug\nVersion:\s8.2\nSubmitDate:\s'1999-08-31'\nLastModified:\s'1999-12-03'\nSeverity:\sSER\nStatus:\sUnAssn\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sSolaris\nOSVersion:\s2.6\nMachine:\sOther\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-10-25'\n\n\nName:\nMichael\sSantos\n\nExtensions:\nBLT\s2.4i\s(but\snot\srequired\sfor\sabove)\n\nComments:\nI\shave\shad\ssimilar\sproblems\sin\sprograms\susing\sTcl_DoOneEvent().\s\sIn\sthis\n\s\s\s\scase,\sthe\sconnection\sis\sestablished\scorrectly\s(ConnectPort()\sis\scalled),\n\s\s\s\sbut\ssubsequent\scommunication\sis\simpossible.\s\sThe\sserver\sseems\sto\signore\n\s\s\s\scommunication\son\sthe\schannel\seven\sthough\sTcl_CreateChannelHandler\swas\n\s\s\s\sused\sto\ssetup\sa\scallback.\s\sThis\slatter\sproblem\sseems\sto\sonly\shappen\swhen\n\s\s\s\sTcl\s8.2\sis\scompiled\swith\sthreads\ssupport.\s\sDisabling\sthread\ssupport\n\s\s\s\sseemed\sto\srestore\sthe\scorrect\sbehavior.\s\sIf\sI\scan\sadapt\sthe\stest\sprogram\n\s\s\s\sfor\sthis\scase,\sI\swill\ssubmit\sanother\sbug\sreport.\n\nReproducibleScript:\nWhen\sopening\sa\sTCP\sserver\ssocket\sand\susing\sTcl_Main\sin\san\sinteractive\n\s\s\s\sapplication,\sconnections\swill\sbe\signored\sunless\s"update"\sor\s"update\n\s\s\s\sidletasks"\sis\sexplicitly\sinvoked\son\sthe\scommand\sline.\n\s\s\s\s\n\s\s\s\sBelow\sis\sa\ssimple\sC\sfile\sto\sillustrate.\s\sConnecting\sto\sthe\sspecified\n\s\s\s\sport\swith\ssome\sother\sprogram\swill\snot\sgenerate\sthe\smessage\sin\n\s\s\s\sConnectPort()\suntil\syou\sinvoke\supdate\son\sthe\scommand\sline.\n\s\s\s\s\n\s\s\s\s#include\s<stdio.h>\n\s\s\s\s#include\s<tcl.h>\n\s\s\s\s\n\s\s\s\sTcl_Interp\s*gInterp;\n\s\s\s\s\n\s\s\s\svoid\s\n\s\s\s\sConnectPort(ClientData\sclientData,\sTcl_Channel\snew_socket,\n\s\s\s\s\s\s\s\schar\s*hostName,\sint\sport)\s{\n\s\s\s\s\s\sfprintf(stderr,\s"ConnectPort()\scalled\swith\shostname\s%s,\sport\s%d\\n",\n\s\s\s\s\s\shostName,\sport);\n\s\s\s\s\n\s\s\s\s\s\sTcl_Close(gInterp,\snew_socket);\n\s\s\s\s}\n\s\s\s\s\n\s\s\s\s\n\s\s\s\svoid\n\s\s\s\sStartServer(ClientData\sclientData)\s{\n\s\s\s\s\s\sTcl_Channel\ssocket;\n\s\s\s\s\s\sfprintf(stderr,\s"StartServer()\scalled.\\n");\n\s\s\s\s\s\ssocket\s=\s\n\s\s\s\s\s\s\s\sTcl_OpenTcpServer(gInterp,\s50099,\sNULL,\s\n\s\s\s\s\s\s\s\s\s\sConnectPort,\s(ClientData)NULL);\n\s\s\s\s\s\sif\s(!socket)\s{\n\s\s\s\s\s\s\s\sTcl_Exit(1);\n\s\s\s\s\s\s}\n\s\s\s\s}\n\s\s\s\s\n\s\s\s\s\n\s\s\s\sint\s\n\s\s\s\sTcl_AppInit(Tcl_Interp\s*interp)\s{\n\s\s\s\s\s\sgInterp\s=\sinterp;\n\s\s\s\s\s\sif\s(Tcl_Init(interp)\s!=\sTCL_OK)\s{\n\s\s\s\s\s\s\s\sfprintf(stderr,\s"Tcl\sfailed\sto\sinitialize.\\n");\n\s\s\s\s\s\s\s\sTcl_Exit(1);\n\s\s\s\s\s\s}\n\s\s\s\s\n\s\s\s\s\s\sStartServer(NULL);\n\s\s\s\s\n\s\s\s\s\s\sreturn\sTCL_OK;\n\s\s\s\s}\n\s\s\s\s\n\s\s\s\s\n\s\s\s\sint\s\n\s\s\s\smain(int\sargc,\schar\s*argv[])\s{\n\s\s\s\s\s\sTcl_Main(argc,\sargv,\sTcl_AppInit);\n\s\s\s\s\n\s\s\s\s\s\sreturn\s0;\n\s\s\s\s}\n\nObservedBehavior:\nAs\smentioned\sabove,\sconnecting\sto\sthe\sserver\ssocket\swill\snot\sresult\sin\sa\n\s\s\s\scall\sto\sConnectSocket()\suntil\s"update"\sis\sentered\son\sthe\scommand\sline\sof\n\s\s\s\sthe\sserver\sprocess.\n\nDesiredBehavior:\nI\sexpect\sto\ssee\sthe\sbehavior\sof\s8.0.5\s(and\sprevious\sversions\s--\shaven't\n\s\s\s\sever\stried\s8.1).\s\sWith\s8.0.5,\sthe\sserver\sprogram\swill\sprint\sthe\n\s\s\s\sConnectPort()\smessage\simmediately\supon\sconnecting\sto\sthe\sport\sfrom\n\s\s\s\sanother\sprogram.\s\sNo\supdate\scall\sis\sneeded\sto\strigger\sit.\n\n\n\n
J foundin obsolete:\s8.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 49.\sThreading
J title Tcl_Main\smisses\sfile\sevents\sunless\s"update"\sis\sexplicitly\sca
J type Bug
K 219301ffffffffffffffffffffffffffffffffff
U nobody
Z 296a84491f082eb8ed146462a4ed4f23