<i>Tcl 8.4.5 with Expect 5.39 hangs waiting for data matching p</i> status still Open with 4 other changes
by
.
D 2004-05-05T07:55:01
J icomment Logged\sIn:\sYES\s\nuser_id=1030524\n\nAs\sfar\sas\sI\sknow\swe\sdo\snot\schange\sanything\sin\sthe\sway\sthe\s\nchannel\sis\sset\sup.\s\s\sIn\saddition,\sthese\ssame\sscripts\swork\sfine\s\nwith\sTcl7.5\sand\sExpect5.21.\n\nThere\sare\stwo\sconditions\schecked\sat\s5298,\s\nCHANNEL_NONBLOCKING\swas\salways\son\sand\sI\snever\sremember\s\nseeing\sCHANNEL_TIMER_FEV.\s\sBoth\sconditions\shave\sto\sbe\s\ntrue\sto\savoid\sthe\sread.\s\s\sThis\sis\show\swe\sgot\sto\sthe\selse\s\ncondition.\n\nI\sbelieve\sour\schannel\sis\salways\sin\snon-blocking\smode\sjust\sas\s\nexpect\sset\sit\sup.\s\sI\sdidn't\ssave\sany\sof\sthe\straces\sI\sdid\safter\sI\s\ninstrumented\sseveral\sof\sthese\sroutines.\n\nThe\ssequence\sI\ssaw\sin\sDoReadChars\sis\sthis,\nAt\s4411\swe\senter\sthe\sfor\sloop\s\s\nAt\s4417\sReadChars\sis\scalled\sand\ssets\scopiedNow.\s\sAfter\sthis\s\ncall,\sthe\sdata\sthat\swas\scopied\sis\sthe\slast\sof\sthe\sdata\sfrom\sour\s\nserver\sand\scontains\sour\slogical\seof\sconsisting\sof\s3\s%\ssigns\s\n(i.e.,\sthe\sprompt).\s\sThere\sis\sno\smore\sdata\sto\sexpect\sfrom\sthe\s\nserver\safter\sthe\sprompt\sis\sseen.\n\nNext\sI\sbelieve\swe\sfall\sthrough\sto\sthe\slogic\sat\s4437\sand\stake\s\nthe\selse\scondition\sat\s4455\swhere\scopied\sand\stoRead\sare\s\nupdated.\s\sRemember\sat\sthis\spoint\sthere\sis\snot\smore\sdata\sso\s\nnext\stime\sthrough\sthe\sfor\sloop\swe\ssomehow\send\sup\smaking\s\nthe\sfunction\scall\sat\s4447.\s\sSince\sthe\sserver\shas\sno\smore\s\ndata,\sthe\sread\shangs.\s\s\n\nI\sthink\swhen\sthe\sdata\swas\sreturned\sby\sReadChars\sexpect\s\nshould\shave\sbeen\sgiven\san\sopportunity\sto\sexamine\sit\sbefore\s\nthe\snext\sread.\n\nHow\scan\sTcl\stell\swhen\sthere\sis\sno\smore\sdata\sat\sthe\schannel?\s\s\nOur\sserver\sis\slong\srunning.\s\sThere\sare\snot\seof\sor\sother\s\nindicators\ssent.\s\sLogical\seof\sis\sdetermined\sby\slooking\sfor\sa\s\nprompt\sin\sthe\sdata,\sit's\stotally\sapplication\sspecific.\n\nSometimes\sI\scan\shang\sthis\sright\saway\swith\smy\stest\sscript\s\nother\stimes\sit\stakes\slonger.\s\sI\shope\sthis\shelps.\s\sLet\sme\sknow\sif\s\nyou\sneed\smore\sinformation\sor\sthe\stest\sscript.\s\sI\scan\s\nreproduces\sthis\sfrom\ssolaris\sto\ssolaris\sover\sa\snetwork.\n\nMike\s\n
J login mellenbe
J mimetype text/plain
J username mellenbe
K 943274ffffffffffffffffffffffffffffffffff
U mellenbe
Z 0c634d21a0f4cacced92c8d34cf34f8c